Skip to content

Commit

Permalink
Add workflow step to notify on Automated Test failure (#1585)
Browse files Browse the repository at this point in the history
* WIP: Added initial workflow step to notify on failure

* Update github workflow to test slack incoming webhook

* Testing run the step when there is a failure

* Updated with link to action run URL

* Removed pull_request trigger

* Testing that step doesn't run on success

* added back workflow step
  • Loading branch information
basiliskus authored Nov 18, 2024
1 parent 9879f54 commit 6f741e0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/automated-staging-test-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,12 @@ jobs:
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AUTOMATED_TEST_AZURE_STORAGE_CONNECTION_STRING }}
run: ./gradlew rs-e2e:clean rs-e2e:automatedTest

- name: Send slack notification on test failure
if: failure()
uses: slackapi/[email protected]
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
text: "Automated Staging RS Integration Test Failed!: https://github.com/CDCgov/trusted-intermediary/actions/runs/${{ github.run_id }}"

0 comments on commit 6f741e0

Please sign in to comment.