Skip to content

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.


JobWhat it checks
ruffruff check . in backend/
ruff (gate)python scripts/check_router_sql.py — blocks new SQL in routers vs baseline
knowledge-alignmentLynCareOS 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-contractspython 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)
pytestDepends 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
vitestnpm test -- --run in frontend/
eslintnpm 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-regressionBackend on 8021, OpenAPI /openapi.json HTTP 200 gate, Vite preview, npm run test:regression
docs-portalOn 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).


Terminal window
cd D:\Projects\LynCareOS
python scripts/assess_knowledge_alignment.py --ci
# Engine: Project Motherboard (see motherboard.yaml pmb_scripts_path)
cd backend
python scripts/export_openapi.py
ruff 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 ..\frontend
npm run generate:types
npm run check:types-drift
npm run validate:architecture
npm run lint:strict
npm run test

After 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).


ConcernCIProduction
DatabaseEphemeral lyncareos_testVPS Docker lyncareos
App deployDocker build not in current workflow.\scripts\deploy.ps1
Migrations on prodNot run from CIinit_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).


After deliberate router→service extraction:

Terminal window
cd backend
python scripts/check_router_sql.py --update

Commit scripts/router_sql_baseline.json with the extraction PR.