Skip to content

Commit

Permalink
add missing Node.js versions to ci action
Browse files Browse the repository at this point in the history
  • Loading branch information
carpasse authored and UlisesGascon committed Apr 18, 2024
1 parent af3830a commit 6eaeef2
Showing 1 changed file with 39 additions and 9 deletions.
48 changes: 39 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
name:
Expand All @@ -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
Expand Down Expand Up @@ -110,36 +114,57 @@ jobs:

- name: Node.js 12.x
node-version: "12.22"
npm-i: [email protected]
npm-rm: beautify-benchmark benchmark

- name: Node.js 13.x
node-version: "13.14"
npm-i: [email protected]
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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6eaeef2

Please sign in to comment.