Skip to content

Commit

Permalink
Add test report once at the end of the build
Browse files Browse the repository at this point in the history
Issue: ZENKO-4876
  • Loading branch information
francoisferrand committed Oct 1, 2024
1 parent 7c969b7 commit 5ade4f3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
10 changes: 9 additions & 1 deletion .github/actions/archive-artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@ runs:
- name: Publish test report
uses: mikepenz/action-junit-report@v4
with:
check_name: ${{ inputs.stage}}
annotate_only: true
job_summary: false
report_paths: ${{ inputs.junit-paths }}
continue-on-error: true

- name: Upload test reports
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.stage}}-test-report
path: ${{ inputs.junit-paths }}
retention-days: 5

- name: Upload results
if: inputs.trunk_token && job.status != 'cancelled'
uses: trunk-io/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/debug-wait/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ runs:
tmate-server-port: ${{ env.TMATE_SERVER_PORT }}
tmate-server-rsa-fingerprint: ${{ env.TMATE_SERVER_RSA_FINGERPRINT }}
tmate-server-ed25519-fingerprint: ${{ env.TMATE_SERVER_ED25519_FINGERPRINT }}
if: job.status == 'failure' && runner.debug == '1'
if: runner.debug == '1'
35 changes: 24 additions & 11 deletions .github/workflows/end2end.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ jobs:
- name: Run smoke tests
run: bash run-e2e-test.sh "end2end" ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG} "smoke" "default"
working-directory: ./.github/scripts/end2end
- name: Debug wait
uses: ./.github/actions/debug-wait
- uses: ./.github/actions/debug-wait
timeout-minutes: 60
if: failure()
- name: Archive and publish artifacts
uses: ./.github/actions/archive-artifacts
with:
Expand Down Expand Up @@ -472,9 +472,9 @@ jobs:
- name: Run CTST end to end tests
run: bash run-e2e-ctst.sh "" "" "" "" --tags @PRA
working-directory: ./.github/scripts/end2end
- name: Debug wait
uses: ./.github/actions/debug-wait
- uses: ./.github/actions/debug-wait
timeout-minutes: 60
if: failure()
- name: Archive and publish artifacts
uses: ./.github/actions/archive-artifacts
with:
Expand Down Expand Up @@ -523,9 +523,9 @@ jobs:
# - name: Run vault e2e tests
# run: bash vault-e2e-test.sh
# working-directory: ./.github/scripts/end2end
- name: Debug wait
uses: ./.github/actions/debug-wait
- uses: ./.github/actions/debug-wait
timeout-minutes: 60
if: failure()
- name: Archive and publish artifacts
uses: ./.github/actions/archive-artifacts
with:
Expand Down Expand Up @@ -562,9 +562,9 @@ jobs:
- name: Run backbeat end to end tests
run: bash run-e2e-test.sh "end2end" ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG} "backbeat" "default"
working-directory: ./.github/scripts/end2end
- name: Debug wait
uses: ./.github/actions/debug-wait
- uses: ./.github/actions/debug-wait
timeout-minutes: 60
if: failure()
- name: Archive and publish artifacts
uses: ./.github/actions/archive-artifacts
with:
Expand Down Expand Up @@ -608,9 +608,9 @@ jobs:
- name: Run CTST end to end tests
run: bash run-e2e-ctst.sh "" "" "" "" --tags 'not @PRA'
working-directory: ./.github/scripts/end2end
- name: Debug wait
uses: ./.github/actions/debug-wait
- uses: ./.github/actions/debug-wait
timeout-minutes: 60
if: failure()
- name: Archive and publish artifacts
uses: ./.github/actions/archive-artifacts
with:
Expand All @@ -622,6 +622,8 @@ jobs:
run: kind delete cluster

write-final-status:
permissions:
checks: write
runs-on: ubuntu-latest
needs:
- check-dashboard-versions
Expand All @@ -635,11 +637,22 @@ jobs:
- end2end-sharded
- end2end-pra
- ctst-end2end-sharded
if: always()
steps:
- name: Upload final status
uses: scality/actions/[email protected]
with:
ARTIFACTS_USER: ${{ secrets.ARTIFACTS_USER }}
ARTIFACTS_PASSWORD: ${{ secrets.ARTIFACTS_PASSWORD }}
JOBS_RESULTS: ${{ join(needs.*.result) }}
if: always()

- name: Download all workflow run artifacts
uses: actions/download-artifact@v4

- name: Publish test report
uses: mikepenz/action-junit-report@v4
with:
check_name: 'junit: test results'
detailed_summary: true
report_paths: '*-test-report/*.xml'
continue-on-error: true

0 comments on commit 5ade4f3

Please sign in to comment.