Skip to content

chore: support multi-arch and prebuild binaries correctly #12

chore: support multi-arch and prebuild binaries correctly

chore: support multi-arch and prebuild binaries correctly #12

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: ${{ matrix.os }}/${{ matrix.arch }} Node ${{ matrix.node }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [16, 18, 20]
arch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v3
# See https://github.com/nodejs/node-gyp/issues/2869
- name: Fix node-gyp and Python
run: python3 -m pip install packaging setuptools
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: |
args: [--ignore-scripts]
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- name: Build binary
run: pnpm binary:build
- name: BenchMark
run: pnpm test:benchmark
- name: Coverage
run: pnpm test:coverage
- name: Upload coverage
if: github.ref == 'refs/heads/master'
uses: codecov/codecov-action@v3