From b0fc1b072e00e51b3ad2482a1c35f4db6207f494 Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Tue, 16 Apr 2024 15:05:00 +0200 Subject: [PATCH] ci: pin node version for windows --- .github/workflows/test.yaml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 64848c1..44886e7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 @@ -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