added mocha reports #407
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- '**.js' | |
- 'package.json' | |
pull_request: | |
paths: | |
- '**.js' | |
- 'package.json' | |
permissions: | |
contents: read | |
actions: read | |
checks: write | |
jobs: | |
test: | |
if: | | |
!contains(toJSON(github.event.commits.*.message), '[skip-ci]') && | |
!startsWith(github.ref, 'refs/tags') | |
name: Generate build and test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- 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 |