Skip to content

Commit 4978255

Browse files
committed
add(751): add publish test result action
followed steps specified in below mentioned link to do the setup https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.8.0/README.md#support-fork-repositories-and-dependabot-branches
1 parent ff03a49 commit 4978255

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/ci.yml

+17
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,20 @@ jobs:
4343
with:
4444
recreate: true
4545
path: code-coverage-results.md
46+
- name: Upload Test Results
47+
if: always()
48+
uses: actions/upload-artifact@v3
49+
with:
50+
name: Test Results
51+
path: |
52+
./temp/testresults/test-results.xml
53+
54+
event_file:
55+
name: "Event File"
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Upload
59+
uses: actions/upload-artifact@v3
60+
with:
61+
name: Event File
62+
path: ${{ github.event_path }}

.github/workflows/test_reports.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test Results
2+
3+
on:
4+
workflow_run:
5+
workflows: ["CI"]
6+
types:
7+
- completed
8+
permissions: {}
9+
10+
jobs:
11+
test_results:
12+
name: Test Results
13+
runs-on: ubuntu-latest
14+
if: github.event.workflow_run.conclusion != 'skipped'
15+
permissions:
16+
checks: write
17+
pull-requests: write
18+
actions: read
19+
steps:
20+
- name: Download and Extract Artifacts
21+
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
22+
with:
23+
run_id: ${{ github.event.workflow_run.id }}
24+
path: artifacts
25+
- name: Publish Test Results
26+
uses: EnricoMi/publish-unit-test-result-action@v2
27+
with:
28+
commit: ${{ github.event.workflow_run.head_sha }}
29+
event_file: artifacts/Event File/event.json
30+
event_name: ${{ github.event.workflow_run.event }}
31+
files: "artifacts/**/*.xml"

0 commit comments

Comments
 (0)