chore: make sure corepack works on Windows #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ' 🧪 Test Windows' | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/**' | |
permissions: | |
contents: read | |
jobs: | |
test-os: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: | |
- 18.x | |
- 20.x | |
- 22.x | |
- 23.x | |
os: | |
- windows-latest | |
# - macos-latest # Smoke test is enough for now. | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Where is corepack | |
run: where corepack | |
shell: bash | |
- name: Where is corepack power shell | |
if: runner.os == 'Windows' | |
run: (Get-Command corepack.cmd).Path | |
shell: pwsh | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4.2.0 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Where is corepack | |
run: where corepack | |
shell: bash | |
- name: Where is corepack power shell | |
if: runner.os == 'Windows' | |
run: (Get-Command corepack.cmd).Path | |
shell: pwsh | |
- name: Clear hosted toolcache for corepack | |
if: runner.os == 'Windows' | |
run: Remove-Item -Recurse -Force (Get-Command corepack.cmd).Path | |
shell: pwsh | |
- name: Enable Corepack | |
run: | | |
npm i -g --force corepack | |
corepack enable | |
pnpm -v | |
shell: bash |