-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (43 loc) · 1.15 KB
/
unit-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: unit test
on:
push:
branches: [master, dev, ci/**]
pull_request:
branches: [master, dev, ci/**]
workflow_dispatch:
# Keep this to allow for triggering manually
jobs:
unit-test:
strategy:
matrix:
node-version:
# currently devDependencies require node>=8.9
- 8
- 10
# - 12 # skip
# - 14 # skip
# - 16 # skip
# - 18 # skip
os:
- windows-latest
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm install
- name: Fix nyc coverage report with node8
run: >
npm install --no-save
istanbul-lib-coverage@3.2.0
istanbul-lib-report@3.0.1
- name: Test
run: npm test
- name: Update Coverage Badge
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == 8 }}
uses: we-cli/coverage-badge-action@main