From 55c8786d5476bd6e54bc479649756f1553e5a059 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Thu, 17 Nov 2022 07:49:36 +0900 Subject: [PATCH 1/3] Remove Node.js 12 from CI testing --- .github/workflows/test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 783519c..0741d66 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 @@ -42,8 +42,7 @@ jobs: cache: npm - 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 - name: Install dependencies run: npm ci From 5901f8f2e9c4a7684799a4902a12a6d51e9a94dc Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Thu, 17 Nov 2022 08:29:18 +0900 Subject: [PATCH 2/3] Add workaround for Node.js 14 and Windows --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0741d66..d355c2d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,6 +41,11 @@ 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 run: npm install --global npm@latest From 54438f2e318cba6420fe0662e1c8bcca30070437 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Thu, 17 Nov 2022 08:35:36 +0900 Subject: [PATCH 3/3] Print the latest npm version --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d355c2d..38db8f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,7 @@ jobs: run: npm install --global npm@8.3 - name: Install latest npm - run: npm install --global npm@latest + run: npm install --global npm@latest && npm --version - name: Install dependencies run: npm ci