Today the tests, lint and build only run on each person's machine. Tests that use the database are skipped without `DATABASE_URL` and still pass, so a passing run can hide that nothing was tested (see the README). This issue makes the checks run for every pull request, and adds the tests that need a browser. ## Scope - **Find out first what we can run.** Does the course git server have CI runners (GitHub Actions or similar), and can they start PostgreSQL 18? Write the answer in this issue. If there are no runners, the alternative is a documented `npm run check` that runs everything locally, and a checklist in the pull request template. - **CI workflow** (if runners exist): on every pull request to `dev` and `main`, with a PostgreSQL 18 service: `npm ci`, `prisma migrate deploy`, the seed, lint, typecheck, build and the tests. The run **fails when database tests are skipped**, so a passing CI always means the search and the API were tested. - **API tests.** The tests in `backend/src/server/` already run queries against the server; check that the cases in "Testing the API" in `docs/API.md` all have a test (the user-data cases come with the resolvers issue). - **End-to-end tests.** A few flows in a real browser (Playwright): search and open an element, filter and sort, log in and make a routine (when the frontend has them). The README says how to run them. - **Branch rules.** Suggest what `dev` and `main` should require before merging (a green CI and one approval) in the README; setting it is up to someone with admin rights. ## Done when - [ ] It is written down whether CI can run, and how - [ ] A pull request runs lint, typecheck, build and all tests including the database tests, and fails if any are skipped - [ ] The cases in "Testing the API" each have a test - [ ] There is at least one end-to-end test of search, and the README explains how to run it - [ ] The README says what a pull request must pass Depends on the server (#28) and, for the user-data cases, the login (#70) and the resolvers for gymnasts and routines. ## Status (2026-10-17) - [x] `npm run check` runs lint, the type checks, the build and all the tests, and fails when a test is skipped or the database is missing; pull request template added (PR #81). - [ ] Whether CI can run is **still open**: the Actions settings and the runners answer 403 for a normal member, and no workflow has ever run on this repository. Someone with admin rights needs to say whether there are runners that can start PostgreSQL 18. The workflow itself would be small: start PostgreSQL, `npm ci`, `npm run db:deploy`, `npm run db:seed`, `npm run check`. - [ ] End-to-end tests (needs a search page in the frontend). - [ ] Check that every case in "Testing the API" has a test (most of them do now; not audited).