Skip to content

Commit 2fedc75

Browse files
Copilotxperiandri
andauthored
ci: add PR #570 test result preview publisher
Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
1 parent 1baf962 commit 2fedc75

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/pull-request.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,30 @@ jobs:
7474
with:
7575
name: test-results-${{ matrix.os }}
7676
path: test-results
77+
78+
publish_test_results_preview:
79+
if: ${{ always() && github.event_name == 'pull_request' && github.event.pull_request.number == 570 }}
80+
name: Publish test results preview
81+
runs-on: ubuntu-latest
82+
needs:
83+
- build
84+
permissions:
85+
actions: read
86+
checks: write
87+
pull-requests: write
88+
steps:
89+
- name: Download test results
90+
uses: actions/download-artifact@v5
91+
with:
92+
pattern: test-results-*
93+
path: test-results
94+
merge-multiple: true
95+
96+
- name: Publish test results
97+
if: ${{ hashFiles('test-results/**/*.trx') != '' }}
98+
uses: EnricoMi/publish-unit-test-result-action@v2
99+
with:
100+
check_name: "Test Results (Preview)"
101+
comment_mode: always
102+
commit: ${{ github.event.pull_request.head.sha }}
103+
files: "test-results/**/*.trx"

0 commit comments

Comments
 (0)