forked from ipfs/ipfs-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 861 Bytes
/
test-unit.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
on:
workflow_call:
jobs:
test-unit:
name: 'test:unit'
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.14.0
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline --no-audit --progress=false
- name: Run unit tests with coverage
run: npm run test:unit:coverage
- name: Generate nyc coverage report
id: coverage
run: npx nyc report --reporter=lcov
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit_tests # optional
name: unit-coverage # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)