Update the CI workflow to use actions/upload-artifact v6 instead of v4 for the Python coverage artifact upload. This keeps the workflow aligned with the current GitHub Actions runtime and avoids deprecated action versions.
110 lines
2.5 KiB
YAML
110 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
frontend:
|
|
name: Frontend tests, lint, and typecheck
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
|
|
- name: Install JavaScript dependencies
|
|
run: npm ci
|
|
|
|
- name: Run JavaScript tests
|
|
run: npm test
|
|
|
|
- name: Run architecture boundary tests
|
|
run: node --test tests/test_architecture_boundaries.mjs
|
|
|
|
- name: Run critical frontend coverage
|
|
run: npm run test:coverage:critical
|
|
|
|
- name: Run ESLint
|
|
run: npm run lint
|
|
|
|
- name: Check TypeScript
|
|
run: npx tsc --noEmit
|
|
|
|
backend:
|
|
name: Python tests, coverage, and static checks
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.10"
|
|
cache: pip
|
|
|
|
- name: Install Python dependencies
|
|
run: python -m pip install --upgrade pip && python -m pip install -e ".[dev]"
|
|
|
|
- name: Run Python tests with coverage
|
|
run: >-
|
|
python -m pytest -q
|
|
--cov=python
|
|
--cov-report=term-missing
|
|
--cov-report=xml:coverage-python.xml
|
|
--cov-fail-under=75
|
|
|
|
- name: Upload Python coverage report
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: python-coverage
|
|
path: coverage-python.xml
|
|
if-no-files-found: error
|
|
|
|
- name: Run Ruff
|
|
run: python -m ruff check __init__.py python tests
|
|
|
|
- name: Check Python syntax
|
|
run: python -m compileall -q __init__.py python tests
|
|
|
|
generated-frontend:
|
|
name: Generated frontend is synchronized
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
|
|
- name: Install JavaScript dependencies
|
|
run: npm ci
|
|
|
|
- name: Build generated frontend
|
|
run: .\\build.bat
|
|
|
|
- name: Verify generated frontend has no diff
|
|
shell: bash
|
|
run: git diff --exit-code -- js
|