Skip to content

Commit

Permalink
Comment results to PR only when issue_comments (#28480)
Browse files Browse the repository at this point in the history
* Comment results to PR only when issue_comments

adjust comment mode

* add same change to newly added workflow
  • Loading branch information
Abacn authored Sep 18, 2023
1 parent fa144f4 commit 3f56f65
Show file tree
Hide file tree
Showing 82 changed files with 185 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/beam_PostCommit_Java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,16 @@ jobs:
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :javaPostCommit
- name: Upload test report
- name: Archive JUnit Test Results
uses: actions/upload-artifact@v3
if: failure()
with:
name: java-code-coverage-report
path: "**/build/test-results/**/*.xml"
name: JUnit Test Results
path: "**/build/reports/tests/"
- name: Publish JUnit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Avro_Versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_DataflowV1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_DataflowV2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Examples_Direct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Examples_Flink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Examples_Spark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Hadoop_Versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
15 changes: 14 additions & 1 deletion .github/workflows/beam_PostCommit_Java_IO_Performance_Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,17 @@ jobs:
gradle-command: :it:${{ matrix.test_case }}
env:
exportDataset: performance_tests
exportTable: io_performance_metrics_test
exportTable: io_performance_metrics_test
- name: Archive JUnit Test Results
uses: actions/upload-artifact@v3
if: failure()
with:
name: JUnit Test Results
path: "**/build/reports/tests/"
- name: Publish JUnit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Jpms_Direct_Java11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Jpms_Direct_Java17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Jpms_Flink_Java11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Jpms_Spark_Java11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_Java_Sickbay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PostCommit_SQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PreCommit_ItFramework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,6 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 2 additions & 0 deletions .github/workflows/beam_PreCommit_Java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/beam_PreCommit_Java_Amqp_IO_Direct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/beam_PreCommit_Java_Azure_IO_Direct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/beam_PreCommit_Java_Cassandra_IO_Direct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/beam_PreCommit_Java_Cdap_IO_Direct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/beam_PreCommit_Java_Csv_IO_Direct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v3
Expand Down
Loading

0 comments on commit 3f56f65

Please sign in to comment.