Skip to content

Commit 9dfb371

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 e125277 commit 9dfb371

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
16+
permissions:
17+
checks: write
18+
pull-requests: write
19+
actions: read
20+
21+
steps:
22+
- name: Download and Extract Artifacts
23+
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
24+
with:
25+
run_id: ${{ github.event.workflow_run.id }}
26+
path: artifacts
27+
28+
- name: Publish Test Results
29+
uses: EnricoMi/publish-unit-test-result-action@v2
30+
with:
31+
commit: ${{ github.event.workflow_run.head_sha }}
32+
event_file: artifacts/Event File/event.json
33+
event_name: ${{ github.event.workflow_run.event }}
34+
files: "artifacts/**/*.xml"

0 commit comments

Comments
 (0)