Add opt-in multithreading #229
Workflow file for this run
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 | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
strategy: | |
matrix: | |
# At the time of writing macos-latest is mac 10; we need 11 to build a universal binary. | |
os: [ubuntu-latest, macos-11, windows-latest] | |
node: [12, 14, 16] | |
arch: [x86, x64] | |
exclude: | |
- { os: ubuntu-latest, arch: x86 } | |
- { os: macos-11, arch: x86 } | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }} / Node ${{ matrix.node }} ${{ matrix.arch }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Use node ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
architecture: ${{ matrix.arch }} | |
# Temporary fix for https://github.com/nodejs/node-gyp/issues/2869 | |
# TODO: instead bump node-gyp to >= 10.0.0 (drops Node.js < 16.14) | |
- name: Use Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install | |
run: npm install | |
- name: Test | |
run: npm test | |
- name: Coverage | |
run: npm run coverage | |
- name: Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: coverage/lcov.info | |
- name: Test Electron | |
if: ${{ matrix.node == '14' }} | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: npm run test-electron | |
- name: Test GC | |
run: npm run test-gc |