Skip to content

GHA: Try running only node 20 on macos #85

GHA: Try running only node 20 on macos

GHA: Try running only node 20 on macos #85

Workflow file for this run

name: ci
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16, 18, 20]
os: [ubuntu-latest, macos-latest]
exclude:
- os: macos-latest
node-version: 16
- os: macos-latest
node-version: 18
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update APT
if: matrix.os == 'ubuntu-latest'
run: sudo apt update
- name: Install OS dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install lcov
# - name: Work around https://github.com/nodejs/node-gyp/issues/2869
# run: python3 -m pip install packaging
- name: Display versions
if: matrix.os == 'ubuntu-latest'
run: |
g++ --version
lcov --version
- name: Print number of CPUs
if: matrix.os == 'ubuntu-latest'
run: nproc
- name: Print number of CPUs
if: matrix.os == 'macos-latest'
run: sysctl -n hw.logicalcpu
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
run: npm ci
- name: Lint
if: matrix.os == 'ubuntu-latest'
run: npx grunt lint
- name: Coverage
if: matrix.os == 'ubuntu-latest'
run: npm run coverage
- name: Coveralls
if: matrix.os == 'ubuntu-latest'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage/lcov_final.info
- name: Test
if: matrix.os == 'macos-latest'
run: npx grunt test