Skip to content

Commit e68d575

Browse files
committed
ci: upgrade corepack
1 parent f7c9dc8 commit e68d575

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/run-tests.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ jobs:
6060
cache-dependency-path: '**/package-lock.json'
6161
- uses: oven-sh/setup-bun@v1
6262
- name: setup pnpm/yarn
63-
run: corepack enable
63+
run: |
64+
npm install -g corepack@latest
65+
corepack enable
6466
shell: bash
6567
- name: Install Deno
6668
uses: denoland/setup-deno@v1
@@ -127,8 +129,17 @@ jobs:
127129
node-version: '18.x'
128130
cache: 'npm'
129131
cache-dependency-path: '**/package-lock.json'
132+
- name: Prefer npm global on windows
133+
if: runner.os == 'Windows'
134+
# On Windows by default PATH prefers corepack bundled with Node.js
135+
# This prepends npm global to PATH to ensure that npm installed global corepack is used instead
136+
run: |
137+
echo "$(npm config get prefix)" >> "$GITHUB_PATH"
138+
shell: bash
130139
- name: setup pnpm/yarn
131-
run: corepack enable
140+
run: |
141+
npm install -g corepack --force
142+
corepack enable
132143
shell: bash
133144
- name: Install Deno
134145
uses: denoland/setup-deno@v1

tests/prepare.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const promises = fixtures.map((fixture) =>
7070
callback()
7171
},
7272
})
73+
7374
console.log(`[${fixture}] Running \`${cmd}\`...`)
7475
const output = execaCommand(cmd, {
7576
cwd,

0 commit comments

Comments
 (0)