17dadb79cc
Coverage has grown well past the configured gates, so they no longer catch regressions. Raise them to just under the measured values, per the standing "regression ratchet, not a target" rule: - frontend lines/statements 80 -> 95, functions 85 -> 89 (measured 96.52/91.08) - frontend branches held at 85 (measured 86.78, the weakest metric) - backend CI --cov-fail-under 50 -> 75 (measured 81) Add NextSteps260914.md as the handoff for the next session. Delete todo.txt, todo_260912.txt and todo-backend.txt, all fully done; NextSteps260913.md is kept as history. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RXMhc9nT6sNz1SL4j8dznL
69 lines
1.7 KiB
YAML
69 lines
1.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
|
|
jobs:
|
|
# ---------------------------------------------------------------------------
|
|
# Backend: ruff lint + pytest with coverage gate (rises as junior tests land)
|
|
# ---------------------------------------------------------------------------
|
|
backend:
|
|
name: Backend (Python)
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: backend
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: astral-sh/setup-uv@v5
|
|
with:
|
|
version: "latest"
|
|
|
|
- name: Install dependencies
|
|
run: uv sync
|
|
|
|
- name: Lint (ruff)
|
|
run: uv run ruff check .
|
|
|
|
- name: Format check (ruff)
|
|
run: uv run ruff format --check .
|
|
|
|
- name: Test with coverage
|
|
# Measured ~81%; set threshold 1-2pp below to catch regressions.
|
|
run: uv run pytest --cov=app --cov-report=term-missing --cov-fail-under=75
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Frontend: ESLint + Vitest with 90% coverage gate
|
|
# ---------------------------------------------------------------------------
|
|
frontend:
|
|
name: Frontend (TypeScript)
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: frontend
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Type check
|
|
run: npm run typecheck
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Test with coverage
|
|
run: npm run coverage
|