Skip to content

Commit b05ddb2

Browse files
committed
ci(v2): Install pnpm via action-setup
1 parent 2be13ba commit b05ddb2

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/template-tests.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,17 @@ jobs:
159159
with:
160160
node-version: ${{ env.NODE_VERSION }}
161161

162-
# Corepack ships with Node and provides yarn + pnpm without extra
163-
# downloads. `corepack enable` makes the shims executable; we don't
164-
# pin a specific version so each project's `packageManager` field
165-
# (when present) drives resolution.
166-
- if: matrix.package_manager == 'yarn' || matrix.package_manager == 'pnpm'
167-
run: corepack enable
168-
162+
# Each PM gets its own setup. Corepack's shim approach didn't work
163+
# reliably without a `packageManager` field in package.json, and
164+
# ubuntu-latest only ships yarn classic pre-installed.
165+
# - npm: bundled with Node (no setup needed)
166+
# - yarn: pre-installed on ubuntu-latest as yarn classic
167+
# - pnpm: pnpm/action-setup adds the binary to PATH
168+
# - bun: oven-sh/setup-bun does the same
169+
- if: matrix.package_manager == 'pnpm'
170+
uses: pnpm/action-setup@v4
171+
with:
172+
version: 10
169173
- if: matrix.package_manager == 'bun'
170174
uses: oven-sh/setup-bun@v2
171175

0 commit comments

Comments
 (0)