Skip to content

ci: run the test suite on Node 20, 22 and 24 - #1

Merged
rogerjeasy merged 2 commits into
mainfrom
ci-tests
Aug 23, 2026
Merged

rogerjeasy merged 2 commits into
mainfrom
ci-tests

Conversation

@rogerjeasy

Copy link
Copy Markdown
Owner

Adds the repo's first CI workflow: .github/workflows/test.yml.

Why not the suggested template

GitHub's stock Node.js starter would fail on step one here. It runs npm ci and sets cache: npm, both of which key off a lockfile — and this plugin has zero runtime dependencies, so there is no package-lock.json and nothing to install. Stripping those leaves checkout → setup-node → npm test.

The other two suggestions don't apply: Deno isn't used anywhere, and publishing to GitHub Packages is meaningless for a plugin that ships via /plugin marketplace add cloning this repo, with "private": true set.

What it checks

Matrix over Node 20, 22, 24. package.json declares engines: >=20 but development happens on v24, so until now nothing verified the floor. fail-fast: false so a break on 20 still reports 22 and 24.

Also sets least-privilege permissions: contents: read and a concurrency group that cancels superseded runs.

Verification

Ran the full suite locally on all three majors before pushing:

Node Result
v20.20.2 344/344 pass
v22.23.2 344/344 pass
v24.19.0 344/344 pass

The YAML was also parsed and structurally checked rather than eyeballed.

🤖 Generated with Claude Code

rogerjeasy and others added 2 commits August 23, 2026 21:40
The repo had no CI, so nothing checked the `engines: >=20` promise while
development happens on v24.

Deliberately not the stock GitHub Node template: that runs `npm ci` and caches
on a lockfile, and this plugin has zero runtime dependencies, so there is no
lockfile and `npm ci` would fail on the first step. With no install step needed
the job is checkout, setup-node, `npm test`.

fail-fast is off so a break on the floor version still reports the others.

Verified locally before pushing: 344/344 on v20.20.2, v22.23.2 and v24.19.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The first run warned three times that actions/checkout@v4 and
actions/setup-node@v4 target Node 20, which GitHub deprecated for the action
runtime and now force-runs on Node 24. This is about the runtime executing the
action code, not the matrix — the Node 20 leg stays, since >=20 is the engines
floor this repo promises.

v5 and up target node24 and clear the warning; both are taken to the current
major.

setup-node v5 made caching automatic, which would have broken a repo with no
lockfile. v6 narrowed that to fire only when package.json declares a
`packageManager` field, and this one does not, so the bump is safe as-is.
Setting package-manager-cache: false anyway, so adding that field later cannot
silently reintroduce a cache step with no lockfile to key on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@rogerjeasy
rogerjeasy merged commit 51f3932 into main Aug 23, 2026
3 checks passed
@rogerjeasy
rogerjeasy deleted the ci-tests branch August 23, 2026 19:47
rogerjeasy added a commit that referenced this pull request Sep 1, 2026
The repo had no CI, so nothing checked the `engines: >=20` promise while
development happens on v24. Matrix covers 20, 22 and 24, with fail-fast off so a
break on the floor version still reports the others.

Deliberately not the stock GitHub Node template: that runs `npm ci` and caches on
a lockfile, and this plugin has zero runtime dependencies, so there is no lockfile
and `npm ci` would fail on the first step. With no install needed the job is
checkout, setup-node, `npm test`.

setup-node is pinned with package-manager-cache: false for the same reason —
v6+ only auto-caches when package.json declares a `packageManager` field, which
this one does not, but pinning it off means adding that field later cannot
silently reintroduce a cache step with no lockfile to key on.

Verified on all three majors locally (344/344 on v20.20.2, v22.23.2, v24.19.0)
and green on Actions before merge.
rogerjeasy added a commit that referenced this pull request Sep 1, 2026
The repo had no CI, so nothing checked the `engines: >=20` promise while
development happens on v24. Matrix covers 20, 22 and 24, with fail-fast off so a
break on the floor version still reports the others.

Deliberately not the stock GitHub Node template: that runs `npm ci` and caches on
a lockfile, and this plugin has zero runtime dependencies, so there is no lockfile
and `npm ci` would fail on the first step. With no install needed the job is
checkout, setup-node, `npm test`.

setup-node is pinned with package-manager-cache: false for the same reason —
v6+ only auto-caches when package.json declares a `packageManager` field, which
this one does not, but pinning it off means adding that field later cannot
silently reintroduce a cache step with no lockfile to key on.

Verified on all three majors locally (344/344 on v20.20.2, v22.23.2, v24.19.0)
and green on Actions before merge.
rogerjeasy added a commit that referenced this pull request Sep 1, 2026
The repo had no CI, so nothing checked the `engines: >=20` promise while
development happens on v24. Matrix covers 20, 22 and 24, with fail-fast off so a
break on the floor version still reports the others.

Deliberately not the stock GitHub Node template: that runs `npm ci` and caches on
a lockfile, and this plugin has zero runtime dependencies, so there is no lockfile
and `npm ci` would fail on the first step. With no install needed the job is
checkout, setup-node, `npm test`.

setup-node is pinned with package-manager-cache: false for the same reason —
v6+ only auto-caches when package.json declares a `packageManager` field, which
this one does not, but pinning it off means adding that field later cannot
silently reintroduce a cache step with no lockfile to key on.

Verified on all three majors locally (344/344 on v20.20.2, v22.23.2, v24.19.0)
and green on Actions before merge.
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