Run lint, format check, tests and build automatically on every pull request, so broken code is caught before review. Optionally deploy `main` to the VM automatically. This supports the course goals for quality control and reproducibility. ## Tasks ### CI (required) - [x] Set up CI runner to the VM - [x] Add a workflow that runs on pull requests to `main` and on pushes to `main` - [x] Steps: `npm ci`, `npm run lint`, `npm run format:check`, `npm run test -- --run`, `npm run build` - [x] Cache npm dependencies to keep runs fast and save energy - [x] Cancel outdated runs when new commits are pushed to the same branch - [x] Require the checks to pass before a PR can be merged (branch protection) - [ ] Add the backend to the workflow once `backend/` exists ### CD (optional, decide as a group) - [ ] Decide whether automatic deployment to the VM is allowed and sensible (SSH access, secrets handling) - [x] Store credentials as repository secrets, never in git - [x] #68 - [x] #69 ### Documentation - [x] Describe the pipeline in the README, including how to run the same checks locally - [ ] Update the commands and deployment sections in AGENTS.md ## Notes - Use `npm run test -- --run` so Vitest runs once instead of staying in watch mode. - Adding any new action or dependency should be agreed on in the group first. - Depends on the test commands working: Update component tests for Apollo. ## Done when Every pull request shows passing or failing checks for lint, format, tests and build, and a PR cannot be merged while they fail.