Skip to content

ci: migrate setup to pnpm/setup - #1121

Open
EhabY wants to merge 1 commit into
mainfrom
ci/migrate-to-pnpm-setup
Open

EhabY wants to merge 1 commit into
mainfrom
ci/migrate-to-pnpm-setup

Conversation

@EhabY

@EhabY EhabY commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Closes #1119

A single SHA-pinned pnpm/setup v3.0.0 step now installs pnpm, provisions Node 22 via pnpm runtime set, and runs pnpm install --frozen-lockfile (require-lockfile: true), replacing pnpm/action-setup + actions/setup-node + a manual install step. publish-extension.yaml's three standalone setup-node usages move over as well, and CONTRIBUTING's Node-version update list now covers both files.

Store cache. An actions/cache restore/save split, matching the existing Chromium cache policy. Every branch restores (lockfile-hash key with a platform prefix fallback, so a dependency bump reuses the rest of the store); only main and releases save. pnpm/setup's own cache: true saves a full store copy per job per run with no restore-only mode (pnpm/setup#62), and v2.1.0 is worse: its restore probes a runtime-less key while saving under a runtime-hashed one, so saved stores are never matched. Main-only saving follows GitHub's trusted-writer guidance and pnpm/pnpm's own Rust cache (save-cache: ${{ github.ref_name == 'main' }}).

Measured on this PR's CI (setup step, warm): Windows 32–37s vs 56–85s baseline, Linux 8–13s. PR post steps drop to ~1s since they no longer save, and duplicate-save warnings are gone by construction. The issue checklist was verified against the pinned source: --frozen-lockfile enforcement, arch-scoped keys for native win32-arm64 Node (the ARM64 job lands with #1108's branch).

If pnpm/setup#62 ships a restore-only mode, the manual cache steps here collapse back to cache: true plus one input.

@EhabY
EhabY force-pushed the ci/migrate-to-pnpm-setup branch 4 times, most recently from e6ab9f7 to 7efc8ac Compare September 21, 2026 14:20
Replace pnpm/action-setup + actions/setup-node + manual install step
with pnpm/setup v3.0.0 (SHA-pinned), which installs pnpm, provisions
Node 22 via pnpm runtime set, and runs pnpm install --frozen-lockfile
(require-lockfile: true). Also migrates publish-extension.yaml's
standalone setup-node usages.

The store cache is a restore/save split around actions/cache, the same
policy as the Chromium cache: every branch restores (lockfile-hash key,
platform prefix fallback so a dependency bump reuses the rest of the
store), only the default branch and releases save. pnpm/setup's own
cache: true saves per job per run (pnpm/setup#55, pnpm/setup#56), and
v2.1.0's runtime-hashed primary key is never matched by its
runtime-less restore probe, so every job saved on every run.

Measured on this PR's CI with pnpm/setup caching (setup step, warm):
Windows 32-37s vs 56-85s baseline, Linux 8-13s. The split keeps those
restore times and drops PR post steps to ~1s.

Closes #1119
@EhabY
EhabY force-pushed the ci/migrate-to-pnpm-setup branch from 7efc8ac to 892fcc0 Compare September 22, 2026 08:28

This branch has not been deployed

No deployments
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.

Migrate CI setup to pnpm/setup

1 participant