Skip to content

Commit

Permalink
[improve][CI] Replace test reporting with less verbose solution (#17319)
Browse files Browse the repository at this point in the history
Fixes #16736

* [improve][CI] Replace test reporting with less verbose solution

- uses https://github.com/mikepenz/action-junit-report which has been
  copied to https://github.com/apache/pulsar-test-infra/tree/master/action-junit-report

* Address review comment: remove merge-test-reports action

(cherry picked from commit cb881d4)
  • Loading branch information
lhotari authored and nicoloboschi committed Sep 9, 2022
1 parent 6ce6c5b commit 3f17dd6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 119 deletions.
44 changes: 0 additions & 44 deletions .github/actions/merge-test-reports/action.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/pulsar-ci-test-report.yaml

This file was deleted.

51 changes: 15 additions & 36 deletions .github/workflows/pulsar-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,12 @@ jobs:
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' && needs.changed_files_job.outputs.cpp_only != 'true' }}
uses: ./.github/actions/copy-test-reports

- name: Report test summary as warning
- name: Publish Test Report
uses: apache/pulsar-test-infra/action-junit-report@master
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' && needs.changed_files_job.outputs.cpp_only != 'true' }}
uses: ./.github/actions/merge-test-reports
with:
summary_title: 'Test Summary for Unit - ${{ matrix.name }}:'

- name: Publish the Test reports in Junit xml format
uses: actions/upload-artifact@v3
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' && needs.changed_files_job.outputs.cpp_only != 'true' }}
with:
name: Unit-${{ matrix.group }}-test-report
path: test-reports
retention-days: 7
report_paths: 'test-reports/TEST-*.xml'
annotate_only: 'true'

- name: Upload Surefire reports
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -449,19 +442,12 @@ jobs:
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' && needs.changed_files_job.outputs.cpp_only != 'true' }}
uses: ./.github/actions/copy-test-reports

- name: Report test summary as warning
- name: Publish Test Report
uses: apache/pulsar-test-infra/action-junit-report@master
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' && needs.changed_files_job.outputs.cpp_only != 'true' }}
uses: ./.github/actions/merge-test-reports
with:
summary_title: 'Test Summary for Integration - ${{ matrix.name }}:'

- name: Publish the Test reports in Junit xml format
uses: actions/upload-artifact@v3
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' && needs.changed_files_job.outputs.cpp_only != 'true' }}
with:
name: Integration-${{ matrix.group }}-test-report
path: test-reports
retention-days: 7
report_paths: 'test-reports/TEST-*.xml'
annotate_only: 'true'

- name: Upload Surefire reports
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -692,26 +678,19 @@ jobs:
run: $GITHUB_WORKSPACE/build/pulsar_ci_tool.sh print_thread_dumps

- name: Aggregates all test reports to ./test-reports and ./surefire-reports directories
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' }}
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' && needs.changed_files_job.outputs.cpp_only != 'true' }}
uses: ./.github/actions/copy-test-reports

- name: Report test summary as warning
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' }}
uses: ./.github/actions/merge-test-reports
with:
summary_title: 'Test Summary for System - ${{ matrix.name }}:'

- name: Publish the Test reports in Junit xml format
uses: actions/upload-artifact@v3
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' }}
- name: Publish Test Report
uses: apache/pulsar-test-infra/action-junit-report@master
if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' && needs.changed_files_job.outputs.cpp_only != 'true' }}
with:
name: System-${{ matrix.group }}-test-report
path: test-reports
retention-days: 7
report_paths: 'test-reports/TEST-*.xml'
annotate_only: 'true'

- name: Upload container logs
uses: actions/upload-artifact@v3
if: ${{ !success() && needs.changed_files_job.outputs.docs_only != 'true' }}
if: ${{ !success() && needs.changed_files_job.outputs.docs_only != 'true' && needs.changed_files_job.outputs.cpp_only != 'true' }}
continue-on-error: true
with:
name: System-${{ matrix.group }}-container-logs
Expand Down

0 comments on commit 3f17dd6

Please sign in to comment.