From e7072b7464e03360468c3df4f4ebb57f1e3a50f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Marqu=C3=ADnez=20Prado?= <25435858+inigomarquinez@users.noreply.github.com> Date: Tue, 14 May 2024 19:24:40 +0200 Subject: [PATCH] ci: add node 19, 20, 21 and 22 versions (#15) PR-URL: https://github.com/pillarjs/parseurl/pull/15 Main changes: * ci: add node 19, 20, 21 and 22 to the ci * ci: fix configure npm step * ci: fix nyc version for node 8 and 9 --- .github/workflows/ci.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50c4ab0..e5d4263 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,10 @@ jobs: - Node.js 16.x - Node.js 17.x - Node.js 18.x + - Node.js 19.x + - Node.js 20.x + - Node.js 21.x + - Node.js 22.x include: - name: Node.js 0.8 @@ -85,12 +89,12 @@ jobs: - name: Node.js 8.x node-version: "8.17" - npm-i: mocha@7.2.0 + npm-i: mocha@7.2.0 nyc@14.1.1 npm-rm: beautify-benchmark benchmark fast-url-parser - name: Node.js 9.x node-version: "9.11" - npm-i: mocha@7.2.0 + npm-i: mocha@7.2.0 nyc@14.1.1 npm-rm: beautify-benchmark benchmark fast-url-parser - name: Node.js 10.x @@ -133,8 +137,20 @@ jobs: node-version: "18.13" npm-rm: beautify-benchmark benchmark fast-url-parser + - name: Node.js 19.x + node-version: "19.6" + + - name: Node.js 20.x + node-version: "20.12" + + - name: Node.js 21.x + node-version: "21.7" + + - name: Node.js 22.x + node-version: "22.0" + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Node.js ${{ matrix.node-version }} shell: bash -eo pipefail -l {0} @@ -149,7 +165,12 @@ jobs: dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" - name: Configure npm - run: npm config set shrinkwrap false + run: | + if [[ "$(npm config get package-lock)" == "true" ]]; then + npm config set package-lock false + else + npm config set shrinkwrap false + fi - name: Remove npm module(s) ${{ matrix.npm-rm }} run: npm rm --silent --save-dev ${{ matrix.npm-rm }} @@ -208,7 +229,7 @@ jobs: needs: test runs-on: ubuntu-latest steps: - - name: Uploade code coverage + - name: Upload code coverage uses: coverallsapp/github-action@master with: github-token: ${{ secrets.github_token }}