test-reporter
test-reporter copied to clipboard
No file found generated by mocha-json
Here's my workflow looks like:
name: Eslint & Mocha test check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
defaults:
run:
working-directory: ./CAScript-node-js-runtime
steps:
- uses: actions/checkout@v2
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Mocha Tests
path: test-results.json
reporter: mocha-json
and test command: mocha -r ts-node/register test/**/*.ts --reporter json > test-results.json
Am I doing any wrong?
I am also seeing this issue
the file definitely exists but maybe its parsing it wrong? I checked that it matches the format in the example output and it looks fine, using dorny/[email protected]
and mocha 9.1.4