Skip to content

test

test #68

Workflow file for this run

name: ' 🧪 Test Windows'
on:
push:
branches:
- test-1222
workflow_dispatch:
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.
fail-fast: false
steps:
- uses: actions/checkout@v4
- 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: List contents of C:\npm\prefix before
# run: dir C:\npm\prefix
# shell: cmd
- name: Check location of corepack before removing hostedtoolcache
run: |
C:\Windows\System32\where.exe corepack
- name: Get exact Node.js version
# id: node-version
run: echo "NODE_VERSION=$(node -v)" >> $GITHUB_ENV
shell: bash
- name: Clear hosted tool cache
run: |
$nodeVersion = $env:NODE_VERSION.TrimStart('v')
Remove-Item -Force "C:\hostedtoolcache\windows\node\$nodeVersion\x64\corepack*"
# shell: pwsh
# - name: install Corepack
# run: |
# npm i -g --force corepack
# - name: List contents of C:\npm\prefix after
# run: dir C:\npm\prefix
# shell: cmd
- name: Check corepack version after removal hostedcache
run: |
corepack --version
# - name: Prepend custom path to PATH
# run: |
# echo "C:\npm\prefix;${{ env.PATH }}" > $env:GITHUB_PATH
- name: install and enable corepack
run: |
npm i -g --force corepack
corepack enable
corepack -v
pnpm -v
shell: bash
- name: Check location of corepack after installing corepack
run: |
C:\Windows\System32\where.exe corepack
- name: Install dependencies
run: pnpm install