diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fdd20598..0811d458 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,20 @@ on: - '.all-contributorsrc' jobs: + recreate-comment: + runs-on: ubuntu-latest + + steps: + - name: (Re-)create Comment + uses: marocchino/sticky-pull-request-comment@v2 + if: ${{ github.event_name == 'pull_request' }} + with: + header: reports + message: | + ## 🚦Reports🚦 + Reports will be posted here as they get available. + recreate: true + generate-matrix: runs-on: ubuntu-latest @@ -163,6 +177,7 @@ jobs: runs-on: ubuntu-latest needs: + - recreate-comment - build-and-test-jvm steps: @@ -175,12 +190,49 @@ jobs: name: test-report-jvm - name: JUnit Test Report - uses: dorny/test-reporter@v1 + id: junit-report + uses: phoenix-actions/test-reporting@v10 with: name: JUnit Test Report JVM path: '**/target/surefire-reports/TEST*.xml' reporter: java-junit + - name: Update PR status comment on success + uses: marocchino/sticky-pull-request-comment@v2 + if: ${{ github.event_name == 'pull_request' && steps.junit-report.conclusion == 'success' }} + with: + header: reports + message: | + +
+

πŸ₯³ JUnit tests passed

+ + |Passed|Failed|Skipped| + |----------|---------|-----------| + |βœ… ${{ steps.junit-report.outputs.passed }}|❌ ${{ steps.junit-report.outputs.failed }}|⚠️ ${{ steps.junit-report.outputs.skipped }}| + + You can see the JUnit report [here](${{ steps.junit-report.outputs.runHtmlUrl }}). +
+ append: true + + - name: Update PR status comment on failure + uses: marocchino/sticky-pull-request-comment@v2 + if: ${{ github.event_name == 'pull_request' && steps.junit-report.conclusion != 'success' }} + with: + header: reports + message: | + +
+

πŸ˜” JUnit JVM tests failed

+ + |Passed|Failed|Skipped| + |----------|---------|-----------| + |βœ… ${{ steps.junit-report.outputs.passed }}|❌ ${{ steps.junit-report.outputs.failed }}|⚠️ ${{ steps.junit-report.outputs.skipped }}| + + You can see the JUnit report [here](${{ steps.junit-report.outputs.runHtmlUrl }}). +
+ append: true + - name: Cancel Build if: ${{ failure() }} uses: andymckay/cancel-action@0.3 @@ -242,6 +294,7 @@ jobs: runs-on: ubuntu-latest needs: + - recreate-comment - build-and-test-native steps: @@ -254,12 +307,49 @@ jobs: name: test-report-native - name: JUnit Test Report - uses: dorny/test-reporter@v1 + id: junit-report + uses: phoenix-actions/test-reporting@v10 with: name: JUnit Test Report Native path: '**/target/*-reports/TEST*.xml' reporter: java-junit + - name: Update PR status comment on success + uses: marocchino/sticky-pull-request-comment@v2 + if: ${{ github.event_name == 'pull_request' && steps.junit-report.conclusion == 'success' }} + with: + header: reports + message: | + +
+

πŸ₯³ Native JUnit tests passed

+ + |Passed|Failed|Skipped| + |----------|---------|-----------| + |βœ… ${{ steps.junit-report.outputs.passed }}|❌ ${{ steps.junit-report.outputs.failed }}|⚠️ ${{ steps.junit-report.outputs.skipped }}| + + You can see the Native JUnit report [here](${{ steps.junit-report.outputs.runHtmlUrl }}). +
+ append: true + + - name: Update PR status comment on failure + uses: marocchino/sticky-pull-request-comment@v2 + if: ${{ github.event_name == 'pull_request' && steps.junit-report.conclusion != 'success' }} + with: + header: reports + message: | + +
+

πŸ˜” Native JUnit tests failed

+ + |Passed|Failed|Skipped| + |----------|---------|-----------| + |βœ… ${{ steps.junit-report.outputs.passed }}|❌ ${{ steps.junit-report.outputs.failed }}|⚠️ ${{ steps.junit-report.outputs.skipped }}| + + You can see the Native JUnit report [here](${{ steps.junit-report.outputs.runHtmlUrl }}). +
+ append: true + - name: Cancel Build if: ${{ failure() }} uses: andymckay/cancel-action@0.3 \ No newline at end of file