Revert "GHA: temporarily disable macos" #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [16, 18, 20] | |
os: [ubuntu-latest, macos-latest] | |
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 | |
# sudo apt install gcc-11 g++-11 lcov | |
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 | |
- 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 |