Skip to content

Commit

Permalink
Reporting functional test only on all pass
Browse files Browse the repository at this point in the history
Signed-off-by: willdavsmith <willdavsmith@gmail.com>
  • Loading branch information
willdavsmith committed Mar 4, 2024
1 parent c60867b commit c25ae26
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/functional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ jobs:
DE_IMAGE: ${{ needs.build.outputs.DE_IMAGE }}
DE_TAG: ${{ needs.build.outputs.DE_TAG }}
FUNCTIONAL_TEST_APP_ID: 425843
outputs:
test_status: ${{ steps.report_test_status.outputs.test_status }}
steps:
- name: Login as the GitHub App
uses: tibdex/github-app-token@v1
Expand Down Expand Up @@ -628,6 +630,30 @@ jobs:
append: true
message: |
:x: ${{ matrix.name }} functional test cancelled. Please check [the logs](${{ env.ACTION_LINK }}) for more details
- id: report_test_status
if: always()
run: |
if ${{ env.test_status }} == 'failure' || ${{ job.status }} == 'failure' || ${{ job.status }} == 'cancelled'; then
echo "test_status=failure" >> $GITHUB_OUTPUT
echo "test_status=failure" >> $GITHUB_ENV
else
echo "test_status=success" >> $GITHUB_OUTPUT
fi
report-test-results:
name: Report test results
needs: [build, tests]
runs-on: ubuntu-latest
if: always()
env:
CHECKOUT_REF: ${{ needs.build.outputs.CHECKOUT_REF }}
FUNCTIONAL_TEST_APP_ID: 425843
steps:
- name: Login as the GitHub App
uses: tibdex/github-app-token@v1
id: get_installation_token
with:
app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }}
private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }}
- uses: LouisBrunner/checks-action@v1.6.1
if: always()
with:
Expand All @@ -636,7 +662,7 @@ jobs:
repo: ${{ github.repository }}
sha: ${{ env.CHECKOUT_REF }}
status: completed
conclusion: ${{ job.status }}
conclusion: ${{ needs.tests.outputs.test_status }}
output: |
{"summary":"Functional Test run completed. See links for more information.","title":"Functional Test Run"}
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Expand Down

0 comments on commit c25ae26

Please sign in to comment.