-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (49 loc) · 1.6 KB
/
unit-test.yml
File metadata and controls
54 lines (49 loc) · 1.6 KB
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
49
50
51
52
53
54
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:
# trying to pick up the lowest versions within the supported options
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#standard-github-hosted-runners-for-public-repositories
- windows-2019
- ubuntu-20.04
# - macos-11 # removed
- macos-12
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-instrument@5.2.1
istanbul-lib-report@3.0.0
istanbul-reports@3.1.5
- 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