fix: set up Node.js in validate-release-pr before the rebuild#10
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
validate-release-prworkflow's "Validate generated release payload" step rebuilds code-scan-action from the promptfoo source and diffs it against the release PR. It rannpm install -g npm@latestwith noactions/setup-node, so npm's global prefix was/usr/localand the install failed on the runner: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 givesnpm install -ga writable prefix — and pins the global npm to11.11.0to match the toolchainpublish-code-scan-actionbuilds the release artifacts with.Test plan
validate-release-pr(maintenance-scope path) passes on this.github/-only PR