Skip to content

Commit c3595aa

Browse files
author
naman-contentstack
committed
updated workflow
1 parent 0da6c6e commit c3595aa

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/unit-test.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: Run Unit Tests
1+
name: Unit Test & Reports
22

33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

77
jobs:
8-
run-tests:
8+
build-test:
9+
name: Build & Test
910
runs-on: ubuntu-latest
1011
steps:
1112
- name: Checkout code
@@ -24,5 +25,18 @@ jobs:
2425
- name: Configure Region
2526
run: csdx config:set:region AWS-NA
2627

27-
- name: Run tests
28-
run: npm run test
28+
- name: Run tests with coverage
29+
run: npm run test:unit:report:json
30+
31+
- name: Test Report
32+
uses: dorny/test-reporter@v1
33+
if: success() || failure()
34+
with:
35+
name: Mocha Unit Test
36+
path: report.json
37+
reporter: mocha-json
38+
39+
- name: Coverage Report
40+
uses: lucassabreu/comment-coverage-clover@main
41+
with:
42+
file: coverage/clover.xml

0 commit comments

Comments
 (0)