From a1713df2e5524eb93c366c47fe5b6d7cd7e1b878 Mon Sep 17 00:00:00 2001 From: Johannes Spangenberg Date: Sat, 4 May 2024 01:43:00 +0200 Subject: [PATCH] Fix issue with Actions v4 --- .github/workflows/test-report.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index c2fd649..fe01c95 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -10,6 +10,7 @@ on: permissions: checks: write + actions: read jobs: report: @@ -18,10 +19,21 @@ jobs: steps: - - name: Test Report + # We have to clone the repo as the test-reporter would run into an error otherwise. + # See https://github.com/dorny/test-reporter/issues/131#issuecomment-2093880211 + - name: Fetch Sources + uses: actions/checkout@v4 + + - name: Download Test Reports + uses: actions/download-artifact@v4 + with: + pattern: test-results-* + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ github.token }} + + - name: Publish Test Reports as Annotations uses: dorny/test-reporter@v1 with: - artifact: /test-results-([^-]*)-(.*)/ - name: "Unit Tests Report: Gradle $1 @ $2" - path: "test-results/*/TEST-*.xml" + name: "Unit Tests Report: Gradle" + path: "test-results-*/test-results/*/TEST-*.xml" reporter: java-junit