Skip to content

add GitHub Actions (#94) #12

add GitHub Actions (#94)

add GitHub Actions (#94) #12

name: Test and Release
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [12, 14, 16, 18, 20]
arch: [x86, x64]
exclude:
- { os: ubuntu-latest, arch: x86 }
- { os: macos-latest, arch: x86 }
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / Node ${{ matrix.node }} ${{ matrix.arch }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 2
# Force Python to 3.11 until prebuild updates to node-gyp 10
- name: Use Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Use node ${{ matrix.node }} ${{ matrix.arch }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.arch }}
- name: Install
run: npm install
- name: Test
env:
PREBUILD_TOKEN: ${{ secrets.PREBUILD_TOKEN }}
run: npm test