-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (35 loc) · 979 Bytes
/
unit_tests.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
name: Unit tests
on: [push, pull_request, workflow_dispatch]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
node-version: [18, 20]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Test
run: npm run test -- run --reporter verbose
coverage:
needs: 'test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Generate coverage report
run: npm run coverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4