node-serialport-bindings-cpp/.github/workflows/test.yml
Francis Gulotta d500a5b1ba
fix: upgrade npm on GitHub actions to fix bug (#1973)
GitHub actions has some intermittent bugs when installing packages. Hopefully this helps.
2019-10-29 23:02:35 -04:00

39 lines
1.1 KiB
YAML

name: Test
on:
push:
branches:
- '**'
# pull_request:
# types: [opened, synchronize]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
os: [ubuntu-latest, windows-latest, macos-latest]
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