12 — CI reference (GitHub Actions)
Purpose: What actually runs in CI today and how to reproduce the same checks locally before merge.
Audience: Engineers.
Version: 1.4
Last Updated: 2026-08-03 20:41:09
Future CD automation design (archived): ../archive/12-CI-CD-target-design.md
Deploy (manual today): 20-PRODUCTION-DEPLOYMENT-GUIDE.md
Environment rules: 00-INDEX.md — Terminology
Workflow file: .github/workflows/ci.yml
Triggers: every push and pull_request on all branches.
Jobs (current)
Section titled “Jobs (current)”| Job | What it checks |
|---|---|
| ruff | ruff check . in backend/ |
| ruff (gate) | python scripts/check_router_sql.py — blocks new SQL in routers vs baseline |
| knowledge-alignment | LynCareOS shim → PMB assess_knowledge_alignment.py --ci. CI checks out PMB to _pmb/ (set repo variable PMB_GITHUB_REPO) or uses local pmb_scripts_path on dev |
| openapi-contracts | python scripts/export_openapi.py then git diff openapi/openapi.json; npm run generate:types then git diff frontend/src/lib/api.types.ts (REQ-PLAT-10) |
| pytest | Depends on knowledge-alignment; Postgres 16 + Redis 7; TEST_DATABASE_URL + DATABASE_URL; migrations via python migrations/runner.py; pytest -m "not slow" (all modules, ~797 tests; excludes live Stripe) |
| pytest (info) | python scripts/d6_router_test_coverage.py after tests — D6 router vs test-file heuristic |
| vitest | npm test -- --run in frontend/ |
| eslint | npm run lint:strict in frontend/ (runs after openapi-contracts) |
| eslint (i18n) | node scripts/check-i18n-eslint-ratchet.mjs + npm run i18n:status in frontend/ (same job) |
| playwright-regression | Backend on 8021, OpenAPI /openapi.json HTTP 200 gate, Vite preview, npm run test:regression |
| docs-portal | On PR: build-docs-portal.ps1 + manifest verify. On push to main (path-filtered docs/**, 10-MAPPINGS): deploy to Cloudflare lyncareos-docs-portal — no Project Motherboard. See docs/plans/2026-08-06-docs-portal-cd-and-starlight.md |
CI database: lyncareos_test @ localhost:5432 (ephemeral — never production).
Local pre-merge (match CI)
Section titled “Local pre-merge (match CI)”cd D:\Projects\LynCareOSpython scripts/assess_knowledge_alignment.py --ci# Engine: Project Motherboard (see motherboard.yaml pmb_scripts_path)
cd backendpython scripts/export_openapi.pyruff check .$env:TEST_DATABASE_URL = "postgresql://lyncare:lyncare@localhost:5432/lyncareos_test"python -m pytest tests/ -m "not slow"python scripts/d6_router_test_coverage.py
cd ..\frontendnpm run generate:typesnpm run check:types-driftnpm run validate:architecturenpm run lint:strictnpm run testAfter changing Pydantic models or route response_model declarations: re-run export + generate:types and commit openapi/openapi.json + src/lib/api.types.ts.
Optional: npm run test:regression in frontend/ with backend on 8021 (see Playwright job in workflow).
Deploy vs CI
Section titled “Deploy vs CI”| Concern | CI | Production |
|---|---|---|
| Database | Ephemeral lyncareos_test | VPS Docker lyncareos |
| App deploy | Docker build not in current workflow | .\scripts\deploy.ps1 |
| Migrations on prod | Not run from CI | init_db() on app startup after image deploy — see 11-DATABASE-SAFETY-AND-MIGRATIONS.md |
Known debt D12: Automated CI → registry → VPS pull is not wired; deploy remains manual (32-KNOWN-DEBTS-REGISTER.md).
Updating the router SQL baseline
Section titled “Updating the router SQL baseline”After deliberate router→service extraction:
cd backendpython scripts/check_router_sql.py --updateCommit scripts/router_sql_baseline.json with the extraction PR.