Skip to content

ci: verify packageManager matches workflow pnpm versions - #555

Open
CemAyyildiz wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
CemAyyildiz:fix/526-check-pnpm-version
Open

CemAyyildiz wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
CemAyyildiz:fix/526-check-pnpm-version

Conversation

@CemAyyildiz

Copy link
Copy Markdown
Contributor

Closes #526

What

Adds scripts/check-pnpm-version.mjs (+ scripts/check-pnpm-version.test.mjs), a manifest check that parses the root package.json packageManager field and every pnpm/action-setup step 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: adds ci:pnpm-version:check and ci:pnpm-version:test
  • .github/workflows/coverage.yml (Node-only, runs on every push/PR to main): new "Validate workflow pnpm version matches packageManager" step
  • docs/CI.md: new section documenting the gate, next to the existing coverage gate

Tests

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-setup steps (bindings-check.yml, coverage.yml) match packageManager.

Scope

New script + its own tests + CI wiring + docs. No existing workflow behavior changed beyond the new step.

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
@karagozemin

Copy link
Copy Markdown
Collaborator

Doğrudan merge denendi; ancak GitHub güncel main ile merge commitini temiz oluşturamıyor. Lütfen main üzerine rebase edip çatışmaları giderin; sonrasında içerik incelemesi olmadan doğrudan merge edilecek.

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.

ci(high/easy): verify packageManager matches workflow pnpm versions

3 participants