Skip to content

chore: add CI test workflow for PRs - #2

Merged
hyspacex merged 1 commit into
mainfrom
chore/ci-test-gating
May 9, 2026
Merged

hyspacex merged 1 commit into
mainfrom
chore/ci-test-gating

Conversation

@hyspacex

@hyspacex hyspacex commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

Adds an automated test gate for PRs and main pushes.

  • Workflow: .github/workflows/test.yml — runs on pull_request and push to main, Node 20/22 matrix, ~1-2 min per leg
  • Steps: npm ci → npm run build:harness (compile + typecheck the harness) → npm test
  • npm test: new script wrapping node --test test/*.mjs so contributors and CI share one entry point
  • Concurrency: cancel-in-progress on the same ref so stale runs don't pile up

Activating the gate

The workflow runs automatically on PRs once this lands. To make it block merges, enable branch protection on main:

```bash
gh api -X PUT repos/hyspacex/harness-cli/branches/main/protection \
-F required_status_checks[strict]=true \
-F 'required_status_checks[contexts][]=test (20)' \
-F 'required_status_checks[contexts][]=test (22)' \
-F enforce_admins=true \
-F required_pull_request_reviews= \
-F restrictions=
```

Or via the web UI: Settings → Branches → Add rule → require status checks test (20) and test (22).

Test plan

  • npm test runs locally (11/11 on main)
  • npm ci resolves cleanly (uses existing package-lock.json)
  • After merge: open PR v0.4.0 feat: adaptive agent workbench #1 (workbench) should automatically get a CI run

🤖 Generated with Claude Code

Runs on every pull_request and on push to main, in a Node 20/22
matrix. Three steps: npm ci, npm run build:harness (which is the
harness's typecheck-and-compile), npm test. The new test script wraps
node --test test/*.mjs so contributors and CI use the same entry
point. concurrency: cancel-in-progress keeps stale runs from blocking
new pushes on a PR. Pair this with branch protection on main to
gate merges on a green run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyspacex
hyspacex merged commit 87f0b66 into main May 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant