chore: add npm run check and a pull request template #81
+91
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
One command that runs everything a pull request must pass, and fails when the database tests were skipped. Part of #76 (not closing it: whether the school server can run CI is still open).
What's in it
npm run check(scripts/check.mjs): Prisma client (and the GraphQL types, oncebackend/codegen.tsexists), lint, type check of the backend, type check and build of the frontend, then all the tests. It fails whenDATABASE_URLis missing (environment orbackend/.env) and when any test is skipped (read from Vitest's JSON report). A normalnpm testpasses with skipped database tests, so a green run could hide that the search and the API were never tested..github/pull_request_template.md: basedev,npm run check, docs, AI usage.Not in this PR (stays in #76)
npm run checkis what such a workflow would call.Testing
npm run checkstops at once with a clear message and exit code 1.it.skipadded on purpose: "1 tests were skipped", exit code 1 (the file was removed again).🤖 Generated with Claude Code