Initial commit
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
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
|
||||
# Target is 90; raise this threshold as junior feature tests land.
|
||||
run: uv run pytest --cov=app --cov-report=term-missing --cov-fail-under=40
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 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: npx tsc --noEmit
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Test with coverage
|
||||
run: npm run coverage
|
||||
Reference in New Issue
Block a user