node-serialport-bindings-cpp/.github/workflows/test.yml
Pavinthan d13514b10b
ia32 build options added in Github workflows (#2221)
Co-authored-by: Pavinthan <pavi.ceymplon@jeylabs.com.au>
2021-02-18 12:55:29 -05:00

43 lines
1.2 KiB
YAML

name: Test
on:
push:
branches:
- '**'
# pull_request:
# types: [opened, synchronize]
jobs:
test:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
config:
- { os: macos-latest, arch: x64 }
- { os: ubuntu-latest, arch: x64 }
- { os: windows-latest, arch: x64 }
- { os: windows-latest, arch: ia32 }
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# https://github.com/nodejs/node-gyp/issues/1663#issuecomment-535049449
- name: patch node gyp on windows to support Visual Studio 2019
if: matrix.os == 'windows-latest'
shell: powershell
run: |
npm install --global node-gyp@latest
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
- name: upgrade npm
run: npm install -g npm
- name: npm install
run: npm install
- name: npm run rebuild
run: npm run rebuild
- name: npm test
run: npm test
- name: coverage
run: npm run coverage
env:
CI: true