Why
Running npm test automatically on pull requests increases trust and helps new contributors.
Where
- Add
.github/workflows/ci.yml
Acceptance Criteria
- Workflow runs on
push and pull_request
- Uses Node LTS (e.g.
node-version: 20)
- Runs
npm ci then npm test
- Fails the PR if tests fail
Why
Running
npm testautomatically on pull requests increases trust and helps new contributors.Where
.github/workflows/ci.ymlAcceptance Criteria
pushandpull_requestnode-version: 20)npm cithennpm test