From dcac79ffb3998b157750d84058f3976f2c98c322 Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Sat, 20 Jan 2024 15:47:28 +0100 Subject: [PATCH] #316 Show test result HTML report --- .github/workflows/gradle-build.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index 2c5bd6e5..853e8393 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -19,8 +19,20 @@ jobs: - name: Execute Gradle build run: ./gradlew check --scan -stacktrace - - name: 'Upload Artifact' + - name: 'Upload Test Results' uses: actions/upload-artifact@v4 with: name: 'Test Results' - path: build/reports/tests \ No newline at end of file + path: build/reports/tests + + - name: 'Generate Test Results Preview' + uses: pavi2410/html-preview-action@v2 + id: preview_test_reports + with: + html_file: 'build/reports/tests/test/index.html' + + - name: 'Show Test Result Preview' + run: + echo ${{ format('[Click here to preview HTML page in browser]({0})', steps.preview_test_reports.outputs.url) }} + with: + message: ${{ format('[Click here to preview HTML page in browser]({0})', steps.preview_test_reports.outputs.url) }} \ No newline at end of file