Skip to content

Commit

Permalink
Add Publish JUnit Test Results Action (#28445)
Browse files Browse the repository at this point in the history
* Archive And Publish JUnit Test Results

* permissions fix
  • Loading branch information
magicgoody authored Sep 14, 2023
1 parent 3ef58f8 commit 220cae7
Show file tree
Hide file tree
Showing 61 changed files with 725 additions and 375 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/beam_PostCommit_Java_Avro_Versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ concurrency:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -70,8 +70,14 @@ jobs:
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :javaAvroVersionsTest
- 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:
files: '**/build/test-results/**/*.xml'
18 changes: 12 additions & 6 deletions .github/workflows/beam_PostCommit_Java_DataflowV1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ concurrency:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -82,8 +82,14 @@ jobs:
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :runners:google-cloud-dataflow-java:postCommit
- 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:
files: '**/build/test-results/**/*.xml'
18 changes: 12 additions & 6 deletions .github/workflows/beam_PostCommit_Java_DataflowV2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ concurrency:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -75,8 +75,14 @@ jobs:
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :runners:google-cloud-dataflow-java:postCommitRunnerV2
- 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:
files: '**/build/test-results/**/*.xml'
19 changes: 11 additions & 8 deletions .github/workflows/beam_PostCommit_Java_Examples_Dataflow_ARM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ env:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -130,11 +130,14 @@ jobs:
-PdisableSpotlessCheck=true \
-PdisableCheckStyle=true \
-PskipCheckerFramework \
- name: Upload test report
- 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:
name: java-code-coverage-report
path: |
"**/build/test-results/**/*.xml"
"**/build/reports/tests/**/*.*"
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ concurrency:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -86,8 +86,14 @@ jobs:
with:
gradle-command: :runners:google-cloud-dataflow-java:examples:java11PostCommit
max-workers: 12
- 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:
files: '**/build/test-results/**/*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ concurrency:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -83,8 +83,14 @@ jobs:
with:
gradle-command: :runners:google-cloud-dataflow-java:examples:java17PostCommit
max-workers: 12
- 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:
files: '**/build/test-results/**/*.xml'
17 changes: 11 additions & 6 deletions .github/workflows/beam_PostCommit_Java_Jpms_Dataflow_Java11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ on:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -79,9 +79,14 @@ jobs:
with:
gradle-command: :sdks:java:testing:jpms-tests:dataflowRunnerIntegrationTest
arguments: -Dorg.gradle.java.home=$JAVA_HOME_11_X64
- name: Archive code coverage results
- 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:
name: archiveJunit
path: "**/build/test-results/**/*.xml"
files: '**/build/test-results/**/*.xml'
17 changes: 11 additions & 6 deletions .github/workflows/beam_PostCommit_Java_Jpms_Dataflow_Java17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ on:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -84,9 +84,14 @@ jobs:
-PskipCheckerFramework
-PcompileAndRunTestsWithJava17
-Pjava17Home=$JAVA_HOME_17_X64
- name: Archive code coverage results
- 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:
name: archiveJunit
path: "**/build/test-results/**/*.xml"
files: '**/build/test-results/**/*.xml'
17 changes: 11 additions & 6 deletions .github/workflows/beam_PostCommit_Java_Jpms_Direct_Java11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ on:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -79,9 +79,14 @@ jobs:
with:
gradle-command: :sdks:java:testing:jpms-tests:directRunnerIntegrationTest
arguments: -Dorg.gradle.java.home=$JAVA_HOME_11_X64
- name: Archive code coverage results
- 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:
name: archiveJunit
path: "**/build/test-results/**/*.xml"
files: '**/build/test-results/**/*.xml'
17 changes: 11 additions & 6 deletions .github/workflows/beam_PostCommit_Java_Jpms_Direct_Java17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ on:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -84,9 +84,14 @@ jobs:
-PskipCheckerFramework
-PcompileAndRunTestsWithJava17
-Pjava17Home=$JAVA_HOME_17_X64
- name: Archive code coverage results
- 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:
name: archiveJunit
path: "**/build/test-results/**/*.xml"
files: '**/build/test-results/**/*.xml'
17 changes: 11 additions & 6 deletions .github/workflows/beam_PostCommit_Java_Jpms_Flink_Java11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ on:
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: read
issues: write
discussions: read
packages: read
pages: read
Expand Down Expand Up @@ -79,9 +79,14 @@ jobs:
with:
gradle-command: :sdks:java:testing:jpms-tests:flinkRunnerIntegrationTest
arguments: -Dorg.gradle.java.home=$JAVA_HOME_11_X64
- name: Archive code coverage results
- 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:
name: archiveJunit
path: "**/build/test-results/**/*.xml"
files: '**/build/test-results/**/*.xml'
Loading

0 comments on commit 220cae7

Please sign in to comment.