From b793a0bf5939d89e98f26ad577b96944a431971c Mon Sep 17 00:00:00 2001 From: aya Date: Wed, 25 Dec 2024 16:30:16 +0200 Subject: [PATCH] Collect reports into 1 report --- .github/workflows/test_common.yml | 79 +++++++++++++++++++------------ 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test_common.yml b/.github/workflows/test_common.yml index 3fc6272b..d2d04e05 100644 --- a/.github/workflows/test_common.yml +++ b/.github/workflows/test_common.yml @@ -90,34 +90,53 @@ jobs: name: allure-results-${{ matrix.shard }} path: allure-results/ - - name: Create job summary - if: always() - env: - JOB_STATUS: ${{ job.status }} - run: | - echo "## Run Information" >> $GITHUB_STEP_SUMMARY - echo "- **Event**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY - echo "- **Actor**: ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY - echo "- **Node1**: ${{ env.NODE_1 }}" >> $GITHUB_STEP_SUMMARY - echo "- **Node2**: ${{ env.NODE_2 }}" >> $GITHUB_STEP_SUMMARY - echo "- **Additonal Nodes**: ${{ env.ADDITIONAL_NODES }}" >> $GITHUB_STEP_SUMMARY - echo "## Test Results" >> $GITHUB_STEP_SUMMARY - echo "Allure report will be available at: https://waku-org.github.io/waku-interop-tests/${{ env.CALLER }}/${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY - if [ "$JOB_STATUS" != "success" ]; then - echo "There are failures with nwaku node. cc <@&1111608257824440330>" >> $GITHUB_STEP_SUMMARY - fi - { - echo 'JOB_SUMMARY<> $GITHUB_ENV - - name: Send report to Discord - uses: rjstone/discord-webhook-notify@v1 - if: always() && env.CALLER != 'manual' - with: - severity: ${{ job.status == 'success' && 'info' || 'error' }} - username: ${{ github.workflow }} - description: "## Job Result: ${{ job.status }}" - details: ${{ env.JOB_SUMMARY }} - webhookUrl: ${{ secrets.DISCORD_TEST_REPORTS_WH }} + + aggregate-reports: + runs-on: ubuntu-latest + needs: tests + steps: + - name: Download all allure results + uses: actions/download-artifact@v4 + with: + path: allure-results + merge-multiple: true + + - name: Get allure history + if: always() + uses: actions/checkout@v4 + with: + ref: gh-pages + path: gh-pages + + - name: Create job summary + if: always() + env: + JOB_STATUS: ${{ job.status }} + run: | + echo "## Run Information" >> $GITHUB_STEP_SUMMARY + echo "- **Event**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY + echo "- **Actor**: ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY + echo "- **Node1**: ${{ env.NODE_1 }}" >> $GITHUB_STEP_SUMMARY + echo "- **Node2**: ${{ env.NODE_2 }}" >> $GITHUB_STEP_SUMMARY + echo "- **Additonal Nodes**: ${{ env.ADDITIONAL_NODES }}" >> $GITHUB_STEP_SUMMARY + echo "## Test Results" >> $GITHUB_STEP_SUMMARY + echo "Allure report will be available at: https://waku-org.github.io/waku-interop-tests/${{ env.CALLER }}/${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY + if [ "$JOB_STATUS" != "success" ]; then + echo "There are failures with nwaku node. cc <@&1111608257824440330>" >> $GITHUB_STEP_SUMMARY + fi + { + echo 'JOB_SUMMARY<> $GITHUB_ENV + + - name: Send report to Discord + uses: rjstone/discord-webhook-notify@v1 + if: always() && env.CALLER != 'manual' + with: + severity: ${{ job.status == 'success' && 'info' || 'error' }} + username: ${{ github.workflow }} + description: "## Job Result: ${{ job.status }}" + details: ${{ env.JOB_SUMMARY }} + webhookUrl: ${{ secrets.DISCORD_TEST_REPORTS_WH }}