ci: pin Node 24 and setup-node@v7

Node 20 is deprecated on GitHub Actions runners. Use setup-node@v7
(node24 action runtime) and install Node 24 for webjs tests so all CI
jobs avoid the deprecation warning.
This commit is contained in:
Reese Norris
2026-07-28 16:56:17 -04:00
parent 6591a2f871
commit a8cf860299
3 changed files with 5 additions and 4 deletions

View File

@@ -20,9 +20,10 @@ jobs:
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: "20"
# Node 20 is EOL on GHA runners; pin current Actions default (24).
node-version: "24"
- name: gofmt
run: test -z "$(gofmt -l .)"
- name: Hygiene (no panic/reflect/fmt.Print in library code)

View File

@@ -997,7 +997,7 @@ cd "$(dirname "$0")/../webjs"
node --test airport-editor/**/*.test.js
```
- Pin **Node 20 LTS** in CI (`actions/setup-node@v4` with `node-version: "20"`).
- Pin **Node 24** in CI (`actions/setup-node@v7` with `node-version: "24"`; local floor ≥20).
- Prefer **zero npm deps** for unit tests (`node:test` only). If `package.json` scripts only, `npm test` can invoke node without `node_modules`.
- Add `node_modules/` to `.gitignore` if any package is ever added.
- Update `Agents.md` §9 and CI workflow in **PR 4**.

View File

@@ -6,7 +6,7 @@ import via relative paths into the go:embed tree.
## Requirements
- Node.js **≥ 20** (CI pins Node 20 LTS)
- Node.js **≥ 20** (CI pins Node 24; floor remains ≥20)
- Zero production npm dependencies for unit tests (`node:test` / `node:assert/strict`)
## Run