#316 Show test result HTML report #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gradle Build Check | ||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: {} | ||
jobs: | ||
gradle: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 8 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Execute Gradle build | ||
run: ./gradlew check --scan -stacktrace | ||
- name: 'Upload Test Results' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: 'Test Results' | ||
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) }} |