Skip to content

Commit 2d72915

Browse files
andykenwardclaude
andauthored
ci: self-contained pnpm setup, drop cache-warming job (#771)
Replace the separate `setup` reusable workflow (a serial cache-warming job that every consumer blocked on via `needs: setup`) with a self-contained `setup-pnpm` composite that installs dependencies using actions/setup-node's built-in, lockfile-keyed pnpm store cache. - Rewrite .github/actions/setup-pnpm to setup pnpm + Node (cache: pnpm) then `pnpm install --frozen-lockfile`, instead of a restore-only step with no install fallback. - Delete .github/workflows/setup.yml and remove `needs: setup` from test, check-dist, update (3 jobs), and sync-readme-versions. Jobs now run in parallel without waiting on a warm-up runner. - Move the repository guard from the removed setup job onto the sync job in sync-readme-versions. - Drops the redundant `needs: setup` on update's schema job, which only runs curl + jq and never used pnpm (was #3). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a842391 commit 2d72915

6 files changed

Lines changed: 8 additions & 63 deletions

File tree

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
22

3-
name: 'Restore pnpm cache'
4-
description: 'Sets up Node and pnpm, restores node_modules and ~/.cache/ from cache (no install)'
3+
name: 'Setup pnpm'
4+
description: 'Sets up Node and pnpm with lockfile-keyed store caching, then installs dependencies'
55
inputs:
66
node-version:
77
description: 'Version of Node'
@@ -10,13 +10,11 @@ inputs:
1010
runs:
1111
using: 'composite'
1212
steps:
13-
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d #v6.0.5
13+
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 #v6.0.8
1414
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
1515
with:
1616
node-version: ${{ inputs.node-version }}
17-
- uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
18-
with:
19-
path: |
20-
node_modules
21-
~/.cache/
22-
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
17+
cache: pnpm
18+
- name: Install dependencies
19+
shell: bash
20+
run: pnpm install --frozen-lockfile

.github/workflows/check-dist.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ concurrency:
2727
cancel-in-progress: true
2828

2929
jobs:
30-
setup:
31-
uses: ./.github/workflows/setup.yml
3230
check-dist:
33-
needs: setup
3431
runs-on: ubuntu-latest
3532
timeout-minutes: 5
3633
steps:

.github/workflows/setup.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/sync-readme-versions.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,8 @@ concurrency:
1515
permissions: {}
1616

1717
jobs:
18-
setup:
19-
if: ${{ github.repository == 'andykenward/github-actions-cloudflare-pages' }}
20-
permissions:
21-
contents: read
22-
uses: ./.github/workflows/setup.yml
2318
sync:
24-
needs: setup
19+
if: ${{ github.repository == 'andykenward/github-actions-cloudflare-pages' }}
2520
name: Sync action version references
2621
runs-on: ubuntu-latest
2722
permissions:

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ concurrency:
1717
cancel-in-progress: true
1818

1919
jobs:
20-
setup:
21-
uses: ./.github/workflows/setup.yml
2220
test:
23-
needs: setup
2421
runs-on: ubuntu-latest
2522
timeout-minutes: 5
2623
steps:

.github/workflows/update.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ concurrency:
1212
permissions: {}
1313

1414
jobs:
15-
setup:
16-
permissions:
17-
contents: read
18-
uses: ./.github/workflows/setup.yml
1915
download:
20-
needs: setup
2116
permissions:
2217
contents: write
2318
pull-requests: write
@@ -52,7 +47,6 @@ jobs:
5247
body: |
5348
This is an automated PR to update payloads.
5449
types:
55-
needs: setup
5650
permissions:
5751
contents: write
5852
pull-requests: write
@@ -85,7 +79,6 @@ jobs:
8579
body: |
8680
This is an automated PR to update generated types.
8781
schema:
88-
needs: setup
8982
permissions:
9083
contents: write
9184
pull-requests: write

0 commit comments

Comments
 (0)