Skip to content

Commit 9a2f47a

Browse files
authored
Create upload-test-results.yml
1 parent c5f86ed commit 9a2f47a

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Upload Test Results"
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Build (Java)"]
6+
types:
7+
- completed
8+
9+
permissions: {}
10+
11+
jobs:
12+
action:
13+
name: "Action"
14+
runs-on: ubuntu-latest
15+
if: github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure'
16+
17+
permissions:
18+
checks: write
19+
pull-requests: write # needed unless run with comment_mode: off
20+
contents: read # only needed for private repository
21+
issues: read # only needed for private repository
22+
actions: read # required by download step to access artifacts API
23+
24+
steps:
25+
26+
- name: "Download and Extract Test Results"
27+
uses: dawidd6/action-download-artifact@0bd50d53a6d7fb5cb921e607957e9cc12b4ce392 # v12
28+
with:
29+
run_id: ${{ github.event.workflow_run.id }}
30+
path: artifacts
31+
32+
- name: "Publish Test Results"
33+
uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2
34+
with:
35+
commit: ${{ github.event.workflow_run.head_sha }}
36+
event_file: artifacts/event-file/event.json
37+
event_name: ${{ github.event.workflow_run.event }}
38+
files: "artifacts/**/*.xml"

0 commit comments

Comments
 (0)