From 6eaeef286b7fc843eb9a684ca448c239116636c5 Mon Sep 17 00:00:00 2001 From: Carlos Serrano Date: Thu, 18 Apr 2024 07:57:04 +0200 Subject: [PATCH] add missing Node.js versions to ci action --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3319b1b..c2daf7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: matrix: name: @@ -31,6 +31,10 @@ jobs: - Node.js 15.x - Node.js 16.x - Node.js 17.x + - Node.js 18.x + - Node.js 19.x + - Node.js 20.x + - Node.js 21.x include: - name: Node.js 0.6 @@ -110,36 +114,57 @@ jobs: - name: Node.js 12.x node-version: "12.22" + npm-i: mocha@9.2.2 npm-rm: beautify-benchmark benchmark - name: Node.js 13.x node-version: "13.14" + npm-i: mocha@9.2.2 npm-rm: beautify-benchmark benchmark - name: Node.js 14.x - node-version: "14.19" + node-version: "14.21" npm-rm: beautify-benchmark benchmark - name: Node.js 15.x - node-version: "15.12" + node-version: "15.14" npm-rm: beautify-benchmark benchmark - name: Node.js 16.x - node-version: "16.14" + node-version: "16.20" npm-rm: beautify-benchmark benchmark - name: Node.js 17.x - node-version: "17.6" + node-version: "17.9" + npm-rm: beautify-benchmark benchmark + + - name: Node.js 18.x + node-version: "18.18" + npm-rm: beautify-benchmark benchmark + + - name: Node.js 19.x + node-version: "19.9" + npm-rm: beautify-benchmark benchmark + + - name: Node.js 20.x + node-version: "20.9" + npm-rm: beautify-benchmark benchmark + + - name: Node.js 21.x + node-version: "21.1" npm-rm: beautify-benchmark benchmark steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Node.js ${{ matrix.node-version }} shell: bash -eo pipefail -l {0} run: | if [[ "${{ matrix.node-version }}" == 0.6* ]]; then - sudo apt-get install g++-4.8 gcc-4.8 libssl1.0-dev + sudo sh -c 'echo "deb http://us.archive.ubuntu.com/ubuntu/ bionic universe" >> /etc/apt/sources.list' + sudo sh -c 'echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list' + sudo apt-get update + sudo apt-get install g++-4.8 gcc-4.8 libssl1.0-dev python2 python-is-python2 export CC=/usr/bin/gcc-4.8 export CXX=/usr/bin/g++-4.8 fi @@ -158,7 +183,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 }} @@ -190,7 +220,7 @@ jobs: echo "node@$(node -v)" echo "npm@$(npm -v)" npm -s ls ||: - (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print "::set-output name=" $2 "::" $3 }' + (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT" - name: Run tests shell: bash