42 lines
758 B
Markdown
42 lines
758 B
Markdown
# GitHub Actions Templates
|
|
|
|
## Node.js Baseline
|
|
|
|
```yaml
|
|
name: Node CI
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
- run: npm ci
|
|
- run: npm run lint
|
|
- run: npm test
|
|
- run: npm run build
|
|
```
|
|
|
|
## Python Baseline
|
|
|
|
```yaml
|
|
name: Python CI
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- run: python3 -m pip install -U pip
|
|
- run: python3 -m pip install -r requirements.txt
|
|
- run: python3 -m pytest
|
|
```
|