Problem
The repo has no CI. gh pr checks is empty for every PR. PR #7 illustrated the cost: a real bug (duplicate const existing in hook.js after merging main) slipped through because nothing automatically ran npm test against the merged tree. We caught it manually — next time we may not.
Proposal
Add a single GitHub Actions workflow that runs on push and pull_request to main:
actions/checkout@v4
actions/setup-node@v4 with Node 18, 20, 22 matrix
npm ci
npm test
.github/workflows/ci.yml, ~30 lines.
Stretch (separate follow-up if scope creeps)
- Lint step (would need to pick a linter — eslint flat config is fine)
- Smoke test the hook:
echo '{}' | node hook.js should exit 0 and write a non-empty overlay
- Smoke test setup non-interactive:
echo '' | node cli.js setup --no-cloud --no-hook should print "Non-interactive install — using username..."
Acceptance criteria
- PRs to
main get a checkmark or a red X within ~2 min
- Tests run on Node 18, 20, 22
- README gets a build-status badge
Problem
The repo has no CI.
gh pr checksis empty for every PR. PR #7 illustrated the cost: a real bug (duplicateconst existinginhook.jsafter merging main) slipped through because nothing automatically rannpm testagainst the merged tree. We caught it manually — next time we may not.Proposal
Add a single GitHub Actions workflow that runs on
pushandpull_requesttomain:actions/checkout@v4actions/setup-node@v4with Node 18, 20, 22 matrixnpm cinpm test.github/workflows/ci.yml, ~30 lines.Stretch (separate follow-up if scope creeps)
echo '{}' | node hook.jsshould exit 0 and write a non-empty overlayecho '' | node cli.js setup --no-cloud --no-hookshould print "Non-interactive install — using username..."Acceptance criteria
mainget a checkmark or a red X within ~2 min