ci: report mocha test results using dorny/test-reporter action

This commit is contained in:
David Sanders
2025-07-24 22:43:28 -07:00
parent 01faaa30ea
commit ebebbced60
2 changed files with 28 additions and 2 deletions

View File

@@ -201,7 +201,7 @@ jobs:
shell: bash
env:
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, json, tap
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
DISPLAY: ':99.0'
NPM_CONFIG_MSVS_VERSION: '2022'
@@ -264,6 +264,13 @@ jobs:
name: test_artifacts_${{ env.ARTIFACT_KEY }}_${{ matrix.shard }}
path: src/electron/spec/artifacts
if-no-files-found: ignore
- name: Upload Mocha JSON Output
if: always() && !cancelled()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: test_output_${{ env.ARTIFACT_KEY }}_${{ matrix.shard }}
path: src/electron/spec/test-results.json
if-no-files-found: ignore
- name: Wait for active SSH sessions
if: always() && !cancelled()
shell: bash
@@ -272,3 +279,19 @@ jobs:
do
sleep 60
done
# TODO - Move this to a separate workflow that works with forks
report:
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
checks: write
steps:
- name: Report Mocha Test Results
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1
if: always() && !cancelled()
with:
artifact: /test_output_(.*)/
name: Mocha Test Results
path: test-results.json
reporter: mocha-json