Skip to content

[infra] CI: run tests on every PR #9

Description

@EvanPaules

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions