b03462066e
Frontend floors move to 96/96/91/92 (measured 97.27/97.27/92.87/93.78) and the backend gate to 80 (measured 83.47). Kept 1-2pp below measured so real regressions fail without false positives on incidental drift. These are a ratchet: raised as coverage grows, never lowered to make a gate pass. 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=80
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# 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
|