mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
43 lines
1.2 KiB
YAML
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
|