Skip to content

chore: bump actions/checkout from 4 to 7 #296

chore: bump actions/checkout from 4 to 7

chore: bump actions/checkout from 4 to 7 #296

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test Node ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
node-version: [ 18, 22 ]
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: npm ci
- name: Install Python test dependencies (FastAPI runtime test)
run: python -m pip install --quiet fastapi uvicorn
- name: Run tests
run: npm test
# the router selftest exercises the GENERATED artifact (templates +
# ADR-022 runtime key resolution) — vitest never loads it, so CI must
- name: Router selftest (generated artifact)
run: node tests/router-selftest.cjs
lint:
name: Lint & format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: ESLint
run: npm run lint
- name: Prettier (check)
run: npm run format:check
# Fails if a README route count drifts from bench/route-proof.json (the committed,
# reproducible evidence). Keeps the headline honest — no clone, no network.
- name: README claims match the bench evidence
run: if [ -f bench/check-readme.mjs ]; then npm run bench:check; else echo "Skipped on public mirror"; fi
# Mutation testing (home-grown, zero-dep): introduces a mutation into each soundness-/
# correctness-critical line and requires a test to KILL it. A surviving mutant = a guarded
# line with no test that bites. The reproduction of DNA-polymerase coupled proofreading.
- name: Mutation testing (guardian tests must bite)
run: npm run mutation
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: npm ci
- name: Install Python test dependencies (FastAPI runtime test)
run: python -m pip install --quiet fastapi uvicorn
- name: Run coverage
run: npm run coverage
# Tokenless upload works on the public mirror only; gated so the private
# HQ run stays quiet. Never fails CI — coverage is report-only (no gate yet).
- name: Upload coverage to Codecov
if: github.repository == 'zyx77550/sparda'
uses: codecov/codecov-action@v5
with:
files: ./coverage/lcov.info
fail_ci_if_error: false