Skip to content

fix: set up Node.js in validate-release-pr before the rebuild#10

Merged
mldangelo merged 1 commit into
mainfrom
fix/validate-release-pr-node-setup
May 22, 2026
Merged

fix: set up Node.js in validate-release-pr before the rebuild#10
mldangelo merged 1 commit into
mainfrom
fix/validate-release-pr-node-setup

Conversation

@mldangelo
Copy link
Copy Markdown
Member

Summary

The validate-release-pr workflow's "Validate generated release payload" step rebuilds code-scan-action from the promptfoo source and diffs it against the release PR. It ran npm install -g npm@latest with no actions/setup-node, so npm's global prefix was /usr/local and the install failed on the runner:

npm error code EACCES
npm error Error: EACCES: permission denied, mkdir '/usr/local/share/man/man5'

Earlier file-scope failures masked this, so the content rebuild has effectively never run for any release PR.

This adds actions/setup-node@v6 (Node 24, matching promptfoo's .nvmrc) — which gives npm install -g a writable prefix — and pins the global npm to 11.11.0 to match the toolchain publish-code-scan-action builds the release artifacts with.

Test plan

  • validate-release-pr (maintenance-scope path) passes on this .github/-only PR
  • After merge, the v0.1.6 release PR's content rebuild runs and passes

The "Validate generated release payload" step rebuilds code-scan-action
and ran `npm install -g` with no actions/setup-node, so npm's global
prefix was /usr/local and the install failed with EACCES on the runner.
Earlier file-scope failures masked this, so the content check had never
actually run.

Add actions/setup-node (Node 24, matching promptfoo's .nvmrc) — which
also gives `npm install -g` a writable prefix — and pin the global npm
to 11.11.0 to match the release job's toolchain.
@mldangelo mldangelo merged commit c9d9eff into main May 22, 2026
4 checks passed
@mldangelo mldangelo deleted the fix/validate-release-pr-node-setup branch May 22, 2026 05:18
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