Skip to content

Commit

Permalink
Update JUnit test reports on PR merged on main
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <[email protected]>
  • Loading branch information
fab-10 committed May 24, 2024
1 parent a31ffc9 commit 23e9201
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: ./gradlew acceptanceTestNotPrivacy --test-dry-run -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
- name: Extract current test list
run: mkdir tmp; find . -type f -name TEST-*.xml | xargs -I{} bash -c "xmlstarlet sel -t -v '/testsuite/@name' '{}'; echo ' acceptanceTestNotPrivacy'" | tee tmp/currentTests.list
- name: get acceptance test reports
- name: Get Acceptance Test Reports
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d
with:
branch: main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
run: ./gradlew test --test-dry-run -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
- name: Extract current test list
run: mkdir tmp; find . -type f -name TEST-*.xml | xargs -I{} bash -c "xmlstarlet sel -t -v '/testsuite/@name' '{}'; echo '{}' | sed 's#\./\(.*\)/build/test-results/.*# \1#'" | tee tmp/currentTests.list
- name: get unit test reports
- name: Get Unit Test Reports
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d
with:
branch: main
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/update-test-reports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: update-test-reports

on:
push:
branches:
- main

jobs:
syncTestReports:
if: github.repository == 'hyperledger/besu'
runs-on: ubuntu-22.04
steps:
- name: Get Unit Test Reports
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d
with:
workflow: pre-review.yml
workflow_conclusion: success
pr: ${{github.event.pull_request.number}}
name_is_regexp: true
name: 'unit-.*-test-results'
path: unit-test-results
if_no_artifact_found: true
- name: Upload Unit Test Results
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: unit-all-test-results
path: 'unit-test-results/**/test-results/**/TEST-*.xml'
- name: Get Acceptance Test Reports
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d
with:
workflow: acceptance-tests.yml
workflow_conclusion: success
pr: ${{github.event.pull_request.number}}
name_is_regexp: true
name: 'acceptance-node-\d*\d-test-results'
path: acceptance-test-results
if_no_artifact_found: true
- name: Upload Acceptance Test Results
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: acceptance-node-0-test-results
path: 'acceptance-test-results/**/test-results/**/TEST-*.xml'

0 comments on commit 23e9201

Please sign in to comment.