Testing & CI¶
Three GitHub Actions workflows live in .github/workflows. Pull requests run checks; pushes to main deploy.
Pull request checks (pr-checks.yml)¶
Runs on pull requests into main (and the legacy monorepo / illinois-chat branches), as one job:
- Trunk lints only the files the PR changed (
check-mode: pull_request). Everything outsideapps/frontendis ignored in.trunk/trunk.yaml, so only frontend issues surface. - Backend tests: a placeholder step for now; no backend tests run in CI yet.
- Node 20 is set up and
npm ciruns inapps/frontend. npm run typechecktype-checks shipped source againsttsconfig.build.json(test files are excluded;npm run typecheck:allcovers them locally).npm run test:coverage:checkruns Vitest with coverage and thenscripts/check-coverage.mjs, which fails if a watched folder drops below its line-coverage floor (for examplesrc/utils100 %,src/pages/api90 %).
Local equivalents¶
cd apps/frontend
npm ci
npm exec trunk check # lint
npm run typecheck # shipped source
npm run typecheck:all # including tests
npm run test # Vitest, watch mode
npm run test:coverage:check # what CI runs
Backend tests live in apps/backend/tests but are not wired into CI yet.
Deploy (illinois-chat-dev.yml)¶
Runs on pushes to main that touch apps/**, infra/** or .github/workflows/**: Trunk on the pushed commits, then builds and pushes the backend, worker, frontend and Crawlee images to ECR and forces a new deployment of the four ECS services. Details and required secrets are on Cloud deployment. A fourth workflow, release-images.yml, builds the same images when a GitHub release is published.
Docs (docs.yml)¶
Runs when docs/**, overrides/**, mkdocs.yml or the workflow itself change: on pull requests it runs uv sync --frozen --only-group docs and uv run --frozen mkdocs build --strict as a check; on pushes to main (and manual dispatch) it also deploys the built site to GitHub Pages. A broken link or anchor therefore fails the PR check, the same way it fails the local build described on Writing docs.