diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 947fd1418..d9b6d4161 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -28,28 +28,9 @@ jobs: - name: Build and Test with Gradle run: ./gradlew build - - name: Upload Test Results - if: ${{ always() }} - uses: actions/upload-artifact@v2 + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() # always run even if the previous step fails with: - name: test-results - path: sdk-java/build/reports/tests/ - - - name: Comment on PR with HTML Report Link - if: ${{ always() }} - uses: actions/github-script@v6 - with: - script: | - const workspaceUrl = '${{ github.workspace }}/sdk-java/build/reports/tests/test/index.html'; - const artifactLink = `HTML Test Report`; - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `Test report is available here: ${artifactLink}`, - }); - - - name: Test github output - id: random-color-generator - run: echo "### Hello world! :rocket:" >> $GITHUB_STEP_SUMMARY + report_paths: 'sdk-java/build/test-results/test/TEST-*.xml'