Skip to content

ci: typecheck and unit tests on every PR - #152

Open
secret-mars wants to merge 1 commit into
aibtcdev:mainfrom
secret-mars:ci/unit-and-typecheck
Open

secret-mars wants to merge 1 commit into
aibtcdev:mainfrom
secret-mars:ci/unit-and-typecheck

Conversation

@secret-mars

Copy link
Copy Markdown
Contributor

x402-api has no PR checks today: .github/workflows/ holds only release-please.yml. Nothing runs the typecheck or the unit tests on a PR, including the payer-nonce guard work in #150.

This adds .github/workflows/ci.yml (on pull_request and pushes to main):

- run: npm ci
- run: npm run check                  # tsc --noEmit
- run: bun test tests/*.unit.test.ts  # unit suites only

npm test (tests/_run_all_tests.ts) stays a manual run: it drives a live worker and needs X402_CLIENT_PK, a funded mnemonic, which CI should not hold. Bun comes from oven-sh/setup-bun@v2, the same as aibtcdev/skills CI.

Checked locally on main @ 11e67af from a clean checkout: npm ci ok, npm run check exits 0, and bun test tests/*.unit.test.ts gives 114 pass / 0 fail across the 8 unit files. So this starts green, and from here on it only catches regressions.

🤖 Generated with Claude Code

The repo has no PR checks today (only release-please). Run tsc --noEmit
and the unit suites (bun test tests/*.unit.test.ts) on every PR and push
to main. The lifecycle suite (npm test) needs a funded mnemonic and a live
worker, so it is left as a manual run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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