fix CI #23
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: 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.10 until prebuild updates to node-gyp 10 | |
- name: Use Python 3.10 | |
if: ${{ matrix.os != 'windows-latest' }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Use node ${{ matrix.node }} ${{ matrix.arch }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
architecture: ${{ matrix.arch }} | |
- name: Setup msvs_version | |
if: ${{ matrix.os == 'windows-latest' && matrix.node < 16}} | |
run: npm config set msvs_version 2022 | |
- name: Install | |
run: npm install | |
- name: Test | |
env: | |
PREBUILD_TOKEN: ${{ secrets.PREBUILD_TOKEN }} | |
run: npm test |