-
Notifications
You must be signed in to change notification settings - Fork 9
39 lines (36 loc) · 1.14 KB
/
test-report.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: 'Test Report'
run-name: 'Test Report: Commit ${{ github.sha }}'
on:
workflow_run:
workflows: ['CI']
types:
- completed
permissions:
contents: read
actions: read
checks: write
jobs:
web-page-report:
name: Web Page Report
runs-on: ubuntu-22.04
steps:
- name: Download test results
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
name: test-results
path: test-results
- uses: dorny/test-reporter@v1.8.0
id: test-results
with:
name: Mocha Tests
path: test-results/test-report.json
reporter: mocha-json
# Workaround for error 'fatal: not a git repository' caused by a call to 'git ls-files'
# See: https://github.com/dorny/test-reporter/issues/169#issuecomment-1583560458
max-annotations: 0
- name: Test Report Summary
run: |
echo "### Test Report page is ready! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "And available at the following [Link](${{ steps.test-results.outputs.url_html }})" >> $GITHUB_STEP_SUMMARY