Skip to content

Remove paid runners #773

Remove paid runners

Remove paid runners #773

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: read
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 24
uses: actions/setup-node@v4
with:
cache: npm
node-version: 24
- 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: [20, 22, 24]
os: [ubuntu-22.04, macos-14, windows-2022]
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: [20, 22, 24]
name: Test for node-${{ matrix.node-version }} on Alpine Linux
runs-on: ubuntu-latest
container:
image: node:${{ matrix.node-version }}-alpine
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: [20, 22, 24]
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
build-with-fortify-source:
strategy:
matrix:
cppflags: ['', '-D _FORTIFY_SOURCE=2', '-D _FORTIFY_SOURCE=3', '-D_FORTIFY_SOURCE=2', '-D_FORTIFY_SOURCE=3']
name: Test that setting _FORTIFY_SOURCE will not break the build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
cache: npm
node-version: 24
- name: Install
run: CPPFLAGS="${{ matrix.cppflags }}" npm ci