Update dependencies #34
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: Build & Test | |
on: [push, pull_request] | |
jobs: | |
build-and-test: | |
name: ${{ matrix.os }} / Node ${{ matrix.node }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest ] | |
node: [ 18, 20, 22 ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies on Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libpcap-dev | |
shell: bash | |
- name: Install dependencies on macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew update | |
brew install libpcap | |
shell: bash | |
- name: Build | |
run: | | |
npm install --build-from-source | |
- name: Test | |
run: | | |
npm test | |
timeout-minutes: 1 | |
build-and-test-alpine: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ 18, 20, 22 ] | |
fail-fast: false | |
container: node:${{ matrix.node }}-alpine | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install build deps | |
run: | | |
apk add g++ libpcap-dev make python3 | |
- name: Build | |
run: | | |
npm install --build-from-source | |
- name: Test | |
run: | | |
npm test | |
timeout-minutes: 1 |