Repository navigation
ci: verify packageManager matches workflow pnpm versions - #555
Open
CemAyyildiz wants to merge 1 commit into
Open
CemAyyildiz wants to merge 1 commit into
CemAyyildiz wants to merge 1 commit into
Conversation
Adds scripts/check-pnpm-version.mjs, which parses the root packageManager field and every pnpm/action-setup step across .github/workflows/*.yml, failing if any workflow declares a different pnpm version. Wired into coverage.yml (Node-only, runs on every push/PR to main) as ci:pnpm-version:test + :check, and documented in docs/CI.md alongside the existing coverage gate. Closes Sub-Rosa-Issue#526
Collaborator
|
Doğrudan merge denendi; ancak GitHub güncel |
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.
Closes #526
What
Adds
scripts/check-pnpm-version.mjs(+scripts/check-pnpm-version.test.mjs), a manifest check that parses the rootpackage.jsonpackageManagerfield and everypnpm/action-setupstep across.github/workflows/*.yml, and fails if any workflow declares a different pnpm version.Why
Keeps every workflow pinned to the exact pnpm version developers and the committed lockfile use — a silent mismatch here can make CI install a different dependency resolution than what's actually shipped.
Wiring
package.json: addsci:pnpm-version:checkandci:pnpm-version:test.github/workflows/coverage.yml(Node-only, runs on every push/PR tomain): new "Validate workflow pnpm version matches packageManager" stepdocs/CI.md: new section documenting the gate, next to the existing coverage gateTests
7 unit tests for the parsing/comparison logic (injectable file-read/list functions, no real filesystem access needed), plus a live run against the repo's actual workflows confirming both current
pnpm/action-setupsteps (bindings-check.yml, coverage.yml) matchpackageManager.Scope
New script + its own tests + CI wiring + docs. No existing workflow behavior changed beyond the new step.