Skip to content

ci: run the Node test suite on ubuntu-latest (Node 20 + 24) - #13

Merged
ZhenghuaBao merged 2 commits into
mainfrom
ci/node-test-ubuntu
Aug 18, 2026
Merged

ci: run the Node test suite on ubuntu-latest (Node 20 + 24)#13
ZhenghuaBao merged 2 commits into
mainfrom
ci/node-test-ubuntu

Conversation

@ZhenghuaBao

@ZhenghuaBao ZhenghuaBao commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Adds a CI job that runs node --test over scripts/*.test.mjs on ubuntu-latest. These tests previously had no CI job.

Matrix:

  • 20 - what action.yml pins via actions/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: read and is safe on fork PRs.

Note for reviewers: the glob is unquoted on purpose. node --test only 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

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>
@ZhenghuaBao

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: efde947107

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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>
@ZhenghuaBao
ZhenghuaBao merged commit f0a7997 into main Aug 18, 2026
2 checks passed
@ZhenghuaBao
ZhenghuaBao deleted the ci/node-test-ubuntu branch August 18, 2026 10:49
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