Skip to content

Commit 5796ff6

Browse files
committed
ci: adopt the setup-pnpm composite action at all 16 remaining Corepack sites
`corepack enable` only writes shims; the pnpm tarball is fetched from registry.npmjs.org on the first pnpm invocation in the job. Every such site is an independent chance for a network flake to fail a job for a reason that has nothing to do with the code under test. The setup-pnpm composite action removes that call by restoring the Corepack store from the actions cache. It was introduced for ci.yml, which now has zero Corepack sites. This applies it to the ten workflows that still had one. Counts across .github/workflows/ (before -> after): corepack enable occurrences 16 -> 0 (10 files -> 0) uses: ./.github/actions/setup-pnpm 7 -> 23 (+16, the matching amount) name: Verify pnpm version 8 -> 0 (folded into the composite) uses: actions/setup-node@ 32 -> 32 (unchanged, deliberately) Every caller keeps its own actions/setup-node step with its literal node-version pin. scripts/check-node-version.mjs scans .github/workflows/*.yml only and reports how many setup-node steps it audited; moving those steps into the composite would drop them from its census while it still printed OK. It still reports 32 setup-node steps across 26 workflows. The two sites whose Corepack step was conditional keep their condition verbatim on the composite step, and stay in position: pr-automation.yml changeset-check (skip label / diff-base guard) release.yml release-integrity (deferred to the repair path only) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx
1 parent 2a6122b commit 5796ff6

10 files changed

Lines changed: 32 additions & 56 deletions

.github/workflows/coverage-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
with:
2929
node-version: '22'
3030

31-
- name: Enable Corepack
32-
run: corepack enable
31+
- name: Setup pnpm
32+
uses: ./.github/actions/setup-pnpm
3333

3434
- name: Get pnpm store directory
3535
shell: bash

.github/workflows/cut-rc.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,8 @@ jobs:
339339
# hotcrm@v1.2.0, whose manifest pins engines.node >=22.
340340
node-version: '22'
341341

342-
- name: Enable Corepack
343-
run: corepack enable
344-
345-
- name: Verify pnpm version
346-
run: pnpm --version
342+
- name: Setup pnpm
343+
uses: ./.github/actions/setup-pnpm
347344

348345
- name: Get pnpm store directory
349346
shell: bash

.github/workflows/lint.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ jobs:
5656
with:
5757
node-version: '22'
5858

59-
- name: Enable Corepack
60-
run: corepack enable
59+
- name: Setup pnpm
60+
uses: ./.github/actions/setup-pnpm
6161

6262
- name: Get pnpm store directory
6363
shell: bash
@@ -2496,11 +2496,8 @@ jobs:
24962496
with:
24972497
node-version: '22'
24982498

2499-
- name: Enable Corepack
2500-
run: corepack enable
2501-
2502-
- name: Verify pnpm version
2503-
run: pnpm --version
2499+
- name: Setup pnpm
2500+
uses: ./.github/actions/setup-pnpm
25042501

25052502
- name: Get pnpm store directory
25062503
shell: bash
@@ -3072,11 +3069,8 @@ jobs:
30723069
with:
30733070
node-version: '22'
30743071

3075-
- name: Enable Corepack
3076-
run: corepack enable
3077-
3078-
- name: Verify pnpm version
3079-
run: pnpm --version
3072+
- name: Setup pnpm
3073+
uses: ./.github/actions/setup-pnpm
30803074

30813075
- name: Get pnpm store directory
30823076
shell: bash
@@ -3249,11 +3243,8 @@ jobs:
32493243
with:
32503244
node-version: '22'
32513245

3252-
- name: Enable Corepack
3253-
run: corepack enable
3254-
3255-
- name: Verify pnpm version
3256-
run: pnpm --version
3246+
- name: Setup pnpm
3247+
uses: ./.github/actions/setup-pnpm
32573248

32583249
- name: Get pnpm store directory
32593250
shell: bash
@@ -3443,11 +3434,8 @@ jobs:
34433434
with:
34443435
node-version: '22'
34453436

3446-
- name: Enable Corepack
3447-
run: corepack enable
3448-
3449-
- name: Verify pnpm version
3450-
run: pnpm --version
3437+
- name: Setup pnpm
3438+
uses: ./.github/actions/setup-pnpm
34513439

34523440
- name: Get pnpm store directory
34533441
shell: bash

.github/workflows/pr-automation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,11 @@ jobs:
423423
with:
424424
node-version: '22'
425425

426-
- name: Enable Corepack
426+
- name: Setup pnpm
427427
if: >-
428428
steps.labels.outputs.skip != 'true'
429429
&& steps.diffbase.outputs.base_error == ''
430-
run: corepack enable
430+
uses: ./.github/actions/setup-pnpm
431431

432432
- name: Install dependencies
433433
if: >-

.github/workflows/publish-smoke.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ jobs:
191191
with:
192192
node-version: '22'
193193

194-
- name: Enable Corepack
195-
run: corepack enable
194+
- name: Setup pnpm
195+
uses: ./.github/actions/setup-pnpm
196196

197197
- name: Get pnpm store directory
198198
shell: bash

.github/workflows/release.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,8 @@ jobs:
274274
with:
275275
node-version: '22'
276276

277-
- name: Enable Corepack
278-
run: corepack enable
279-
280-
- name: Verify pnpm version
281-
run: pnpm --version
277+
- name: Setup pnpm
278+
uses: ./.github/actions/setup-pnpm
282279

283280
- name: Get pnpm store directory
284281
shell: bash
@@ -507,9 +504,9 @@ jobs:
507504
508505
# Everything below is skipped on the overwhelmingly common path (nothing to
509506
# repair), which is why the install is here rather than at the top of the job.
510-
- name: Enable Corepack
507+
- name: Setup pnpm
511508
if: steps.audit.outputs.releases-missing == 'true'
512-
run: corepack enable
509+
uses: ./.github/actions/setup-pnpm
513510

514511
- name: Install dependencies
515512
if: steps.audit.outputs.releases-missing == 'true'
@@ -670,11 +667,8 @@ jobs:
670667
echo " see the run's deployment history for the reviewer and timestamp"
671668
} >> "$GITHUB_STEP_SUMMARY"
672669
673-
- name: Enable Corepack
674-
run: corepack enable
675-
676-
- name: Verify pnpm version
677-
run: pnpm --version
670+
- name: Setup pnpm
671+
uses: ./.github/actions/setup-pnpm
678672

679673
- name: Get pnpm store directory
680674
shell: bash

.github/workflows/rerun-safety-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ jobs:
5454
with:
5555
node-version: '22'
5656

57-
- name: Enable Corepack
58-
run: corepack enable
57+
- name: Setup pnpm
58+
uses: ./.github/actions/setup-pnpm
5959

6060
- name: Get pnpm store directory
6161
shell: bash

.github/workflows/scaffold-e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
with:
5353
node-version: '22'
5454

55-
- name: Enable Corepack
56-
run: corepack enable
55+
- name: Setup pnpm
56+
uses: ./.github/actions/setup-pnpm
5757

5858
- name: Get pnpm store directory
5959
shell: bash

.github/workflows/spec-liveness-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
with:
4646
node-version: '22'
4747

48-
- name: Enable Corepack
49-
run: corepack enable
48+
- name: Setup pnpm
49+
uses: ./.github/actions/setup-pnpm
5050

5151
- name: Install dependencies
5252
run: pnpm install --frozen-lockfile

.github/workflows/validate-deps.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ jobs:
3939
with:
4040
node-version: '22'
4141

42-
- name: Enable Corepack
43-
run: corepack enable
44-
45-
- name: Verify pnpm version
46-
run: pnpm --version
42+
- name: Setup pnpm
43+
uses: ./.github/actions/setup-pnpm
4744

4845
- name: Get pnpm store directory
4946
shell: bash

0 commit comments

Comments
 (0)