ci(js): add Bun and Deno to JS CI matrix with runtime-compat tests#889
Merged
ci(js): add Bun and Deno to JS CI matrix with runtime-compat tests#889
Conversation
Test Node bindings under Bun (latest + canary) alongside the existing Node 20/22/24/latest matrix. Gate job now requires both runtimes green.
Replace separate build-and-test + bun-test jobs with one matrix using runtime (node/bun) × version. Conditional steps handle runtime-specific setup (setup-node vs setup-bun, npm test vs bun run test).
Add Deno 2.x and canary to the CI matrix. Refactor matrix to use `run` and `pkg` variables per entry: Deno uses npm for install/build (napi-rs needs Node) and `deno run -A` for executing examples.
'bun test' invokes Bun's built-in test runner instead of the package.json script. 'bun run test' correctly delegates to ava.
Add runtime-compat.test.mjs using node:test + node:assert — runs directly under Bun and Deno without ava dependency. Covers core execution, variables, filesystem, pipes, VFS API, error handling, control flow, all builtins, BashTool metadata, security/resource limits, and instance isolation. Node continues running the full ava suite; Bun/Deno run this file directly with their respective runtimes plus examples.
…times - Split monolithic runtime-compat.test.mjs into 8 focused files in __test__/runtime-compat/ (basics, builtins, control-flow, error-handling, filesystem, vfs, tool-metadata, security, scripts) plus shared _setup.mjs. - Node now runs BOTH ava (full functional suite) AND runtime-compat tests. - Bun/Deno run runtime-compat + examples. - Update specs/004-testing.md with JS runtime compat testing strategy, CI matrix, maintenance rules, and local run instructions.
d8e2e47 to
4e895a8
Compare
- Load wrapper.js instead of index.cjs in _setup.mjs so executeSyncOrThrow and BashError are available - Use 'bun test' instead of 'bun <file>' for Bun (required for node:test describe/it APIs) - Split export/unset into own test case for isolation
Unset of exported variables may behave differently. Match the ava test's pattern: assign with X=123, then unset X.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
__test__/runtime-compat/test suite usingnode:test+node:assert(no npm deps) that runs natively under all three runtimesspecs/004-testing.mdwith runtime compat testing strategy and maintenance rulesTest plan
js-check) correctly blocks on any failure