-
Notifications
You must be signed in to change notification settings - Fork 7
30 lines (30 loc) · 1.04 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
name: Unit Test & Reports
on:
pull_request:
branches:
- master
- main
- next
jobs:
build-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # checkout the repo
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci # install packages
- run: npm run test:unit:report:json # run tests (configured to use jest-junit reporter)
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Mocha Unit test # Name of the check run which will be created
path: report.json # Path to test results
reporter: mocha-json # Format of test results
- name: Coverage report
uses: lucassabreu/comment-coverage-clover@main
with:
file: coverage/clover.xml