Skip to content

Commit

Permalink
added mocha reports
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamkrishnar committed Apr 6, 2024
1 parent 1adca1c commit e89e6b7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
paths:
- '**.js'
- 'package.json'
permissions:
contents: read
actions: read
checks: write
jobs:
test:
if: |
Expand All @@ -25,3 +29,10 @@ jobs:
- run: yarn install --frozen-lockfile
- run: yarn test
- run: yarn build && yarn run test-dist
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Mocha Tests
path: "*-report.json"
reporter: mocha-json
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,7 @@ out
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# reports
src-report.json
dist-report.json
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"start-server": "node test/testUtils/test-server.js",
"local-run-script": "node local-run.js",
"local-run": "start-server-and-test start-server http://localhost:8080 local-run-script",
"test-run": "mocha --parallel --jobs 100 test/**.js",
"test-run": "mocha --parallel --reporter json --reporter-option output=src-report.json --jobs 100 test/**.js",
"test": "yarn run lint && start-server-and-test start-server http://localhost:8080 test-run",
"test-run-dist": "DIST=true mocha --parallel --jobs 100 test/**.js",
"test-run-dist": "DIST=true mocha --parallel --reporter json --reporter-option output=dist-report.json --jobs 100 test/**.js",
"test-dist": "yarn run lint && start-server-and-test start-server http://localhost:8080 test-run-dist"
},
"repository": {
Expand Down

0 comments on commit e89e6b7

Please sign in to comment.