From b382e2e2ad6a0cfb0f3913a91f9d8ec800712218 Mon Sep 17 00:00:00 2001 From: Francesco Trotta Date: Tue, 24 Oct 2023 19:29:35 +0200 Subject: [PATCH 1/2] ci: only use supported version of npm --- .github/workflows/ci.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44bc6bf..ccdc397 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,18 +25,33 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [20.x, 19.x, 18.x, 16.x, 14.x] + versions: + - node: 20.x + npm: '10' + - node: 19.x + npm: '9' + - node: 18.x + npm: '10' + - node: 16.x + npm: '9' + - node: 14.x + npm: '9' include: - os: windows-latest - node: "18.x" + versions: + - node: 18.x + npm: '10' runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} - - name: Install latest NPM - run: npm install -g npm@latest + node-version: ${{ matrix.versions.node }} + - name: Install latest supported NPM + shell: bash + run: | + npm install -g npm@${{ matrix.versions.npm }} + echo -n "Installed npm version is `npm -v`" - name: Install dependencies run: npm ci - name: Run tests From 4ceb94c59bcf1d9eee29fd0ba3787d83281aae6c Mon Sep 17 00:00:00 2001 From: Francesco Trotta Date: Thu, 26 Oct 2023 16:12:34 +0200 Subject: [PATCH 2/2] don't install npm --- .github/workflows/ci.yml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccdc397..38acce9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,33 +25,16 @@ jobs: strategy: matrix: os: [ubuntu-latest] - versions: - - node: 20.x - npm: '10' - - node: 19.x - npm: '9' - - node: 18.x - npm: '10' - - node: 16.x - npm: '9' - - node: 14.x - npm: '9' + node: [20.x, 19.x, 18.x, 16.x, 14.x] include: - os: windows-latest - versions: - - node: 18.x - npm: '10' + node: "18.x" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.versions.node }} - - name: Install latest supported NPM - shell: bash - run: | - npm install -g npm@${{ matrix.versions.npm }} - echo -n "Installed npm version is `npm -v`" + node-version: ${{ matrix.node }} - name: Install dependencies run: npm ci - name: Run tests