Skip to content

chore: make sure corepack works on Windows #5

chore: make sure corepack works on Windows

chore: make sure corepack works on Windows #5

Workflow file for this run

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.exe).Path
shell: pwsh
- name: Clear hosted toolcache for corepack
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\hostedtoolcache\windows\node\$nodeVersion\x64\corepack*"
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: Enable Corepack
run: |
npm i -g --force corepack
corepack enable
pnpm -v
shell: bash