mirror of
https://github.com/renorris/openfsd
synced 2026-08-10 11:33:29 +08:00
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:
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -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)
|
||||
|
||||
@@ -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**.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user