ci: run the Node test suite on ubuntu-latest (Node 20 + 24) - #13
Merged
Conversation
The 11 test files under scripts/*.test.mjs had no CI job, so they only ever ran on contributor machines. That left a real blind spot: on Windows several of them abort inside libuv (exit 0xC0000409, "Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), src/win/async.c") instead of failing an assertion. Because many of these tests assert on the exit status of a spawned child -- report.test.mjs checks `r.status === 0` -- that native crash is indistinguishable from a genuine regression when read locally. Linux is both the action's real runtime and free of that libuv bug, so this job is the authoritative signal. Matrix rationale: 20 - what action.yml pins via actions/setup-node; the production runtime. 24 - current Node, to catch forward-compat breakage before a runner bump. The glob is left unquoted so the shell expands it: `node --test` only gained native glob support in Node 21, so a quoted pattern would be treated as a literal filename on the Node 20 leg. No secrets needed -- the tests bind loopback HTTP servers and use dummy credentials, so this is safe on fork PRs and runs with contents:read only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Trim the rationale block to the two notes that affect maintenance: why the matrix is 20 + 24, and why the glob is unquoted. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Adds a CI job that runs
node --testoverscripts/*.test.mjsonubuntu-latest. These tests previously had no CI job.Matrix:
20- whataction.ymlpins viaactions/setup-node; the version the tested code runs on.24- current Node, to catch forward-compat breakage before a runner bump.No secrets required: the tests bind loopback HTTP servers and use dummy credentials, so it runs with
contents: readand is safe on fork PRs.Note for reviewers: the glob is unquoted on purpose.
node --testonly gained native glob support in Node 21, so a quoted pattern would be read as a literal filename on the Node 20 leg.Result: 184 tests, 184 pass, 0 fail on both versions.
🤖 Generated with Claude Code