chore: use npm ci in CI and align Node.js version across workflows#300
Open
chore: use npm ci in CI and align Node.js version across workflows#300
Conversation
Replace npm install with npm ci in all three ci.yml jobs (docker-preflight,
unit-tests, npm-e2e) for lockfile-exact reproducible installs that fail fast
when the lockfile is out of sync.
Align Node.js version: publish-release.yml's publish-npm job was using
node-version: 24 while ci.yml uses 22; both now use 22 to match the
engines.node field in package.json ("22.x"). Also add cache: npm to
the publish-npm setup-node step for consistency with all other Node.js steps.
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
npm install→npm ci: All three jobs inci.yml(docker-preflight,unit-tests,npm-e2e) were usingnpm installduring CI runs. Replaced withnpm cifor lockfile-exact reproducible installs —npm ciis faster, respects the lockfile strictly, and fails if the lockfile is out of sync withpackage.json.publish-release.yml'spublish-npmjob was usingnode-version: 24whileci.ymluses22. Aligned the release job to22to match theengines.node: "22.x"field inpackage.jsonand ensure test and release environments run on the same Node.js version.cache: npmto thepublish-npmjob'ssetup-nodestep, consistent with all other Node.js steps in both workflow files.Test plan
npm ci)npm run setupor any other npm script invocationspublish-release.ymldiff is limited tonode-version: 22andcache: npmaddition