From 4222d78d90fee4e4f991745bdc3a7def29871e88 Mon Sep 17 00:00:00 2001 From: Johannes Spangenberg Date: Sat, 4 May 2024 07:22:06 +0200 Subject: [PATCH] Fix issue with Actions v4 --- .github/workflows/test-report.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 75d37b1..63f64af 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -15,11 +15,25 @@ jobs: steps: - - name: Test Report + # We have to clone the repo as the test-reporter otherwise runs into an error. + # See https://github.com/dorny/test-reporter/issues/131#issuecomment-2093880211 + - name: Fetch Sources + uses: actions/checkout@v4 + + # We have to manually download the artifact because dorny/test-reporter@v1 + # does not support artifacts uploaded by actions/upload-artifact@v4. + # See https://github.com/dorny/test-reporter/issues/343 + - 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" + path: "test-results-*/test-results/*/TEST-*.xml" reporter: java-junit fail-on-empty: false