Bump node-addon-api from 8.2.1 to 8.2.2 (#433) #580
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: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
coverage: | |
name: Report coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
env: | |
npm_config_debug: true | |
- name: Run tests | |
run: node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info test.cjs | |
- name: Install lcov | |
run: sudo apt install -yq lcov | |
- name: Merge coverage reports | |
run: | | |
lcov --capture --directory . --no-external --output-file lcov-cpp.info | |
lcov --add-tracefile lcov-cpp.info --add-tracefile lcov.info --output-file lcov.info | |
lcov --remove lcov.info "*/node_modules/*" --output-file lcov.info | |
- name: "Send to Codacy" | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
coverage-reports: lcov.info | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
test: | |
strategy: | |
matrix: | |
node-version: [18, 20, 22] | |
os: [ubuntu-20.04, macos-12, macos-m1, windows-2019] | |
name: Test for node-${{ matrix.node-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm test | |
test-alpine: | |
strategy: | |
matrix: | |
node-version: [18, 20, 22] | |
name: Test for node-${{ matrix.node-version }} on Alpine Linux | |
runs-on: ubuntu-latest | |
container: | |
image: node:${{ matrix.node-version }}-alpine3.18 | |
steps: | |
- name: Install build deps | |
run: apk add make g++ python3 git | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm test | |
test-freebsd: | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
name: Test for node-${{ matrix.node-version }} on FreeBSD | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: vmactions/freebsd-vm@v1 | |
with: | |
prepare: | | |
pkg install -y gmake python3 npm-node${{ matrix.node-version }} | |
run: | | |
npm ci | |
npm test | |
sync: sshfs |