diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 783519c..38db8f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ on: node-version: description: Node.js version required: false - default: '["12", "14", "16", "18"]' + default: '["14", "16", "18"]' type: string os: description: OS name @@ -41,9 +41,13 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm + # HACK: See https://github.com/npm/cli/issues/4341 + - name: Workaround for npm installation failure on Node.js 14 and Windows + if: ${{ startsWith(matrix.node-version, '14') && startsWith(matrix.os, 'windows') }} + run: npm install --global npm@8.3 + - name: Install latest npm - # TODO: npm@9 is the latest, but it doesn't work on Node.js v12 and v14 with windows. - run: npm install --global npm@8 + run: npm install --global npm@latest && npm --version - name: Install dependencies run: npm ci