Skip to content

Commit

Permalink
ci: pin node version for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovicm67 committed Apr 16, 2024
1 parent 5e49d88 commit b0fc1b0
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
- name: Set up Node.js (except for Windows)
if: ${{ runner.os != 'Windows' }}
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm

- name: Remove some dependencies for Windows
# https://github.com/approvals/Approvals.NodeJS/issues/176
- name: Set up Node.js (for Windows)
if: ${{ runner.os == 'Windows' }}
run: chmod -R 777 . && npm rm pm2 chromium
uses: actions/setup-node@v4
with:
node-version: '20.12.1'
cache: npm

- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -62,12 +67,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
- name: Set up Node.js (except for Windows)
if: ${{ runner.os != 'Windows' }}
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm

# https://github.com/approvals/Approvals.NodeJS/issues/176
- name: Set up Node.js (for Windows)
if: ${{ runner.os == 'Windows' }}
uses: actions/setup-node@v4
with:
node-version: '20.12.1'
cache: npm

- name: Remove some dependencies for Windows
if: ${{ runner.os == 'Windows' }}
run: chmod -R 777 . && npm rm pm2 chromium
Expand Down

0 comments on commit b0fc1b0

Please sign in to comment.