Skip to content

Commit

Permalink
Report to our slack channel when tests or notebooks fail (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenxu95 authored Jun 21, 2022
1 parent e5d33ae commit 48d6001
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,20 @@ jobs:
run: pytest . -rP --publish -n 5

- uses: actions/upload-artifact@v3
if: ${{ always() }}
if: always()
with:
name: Server Logs
path: logs/

- name: Report to Slack on Failure
if: always()
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ job.status }}
notification_title: ''
message_format: '{emoji} *{workflow}* has {status_message}'
footer: '{run_url}'
notify_when: 'failure,warnings'
mention_users: 'U025MDH5KS6'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
15 changes: 14 additions & 1 deletion .github/workflows/run-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,20 @@ jobs:
run: python3 run_notebook.py --path "churn_prediction/Build and Deploy Churn Ensemble.ipynb" --api_key ${{ env.API_KEY }} --server_address localhost:8080

- uses: actions/upload-artifact@v3
if: ${{ always() }}
if: always()
with:
name: Server Logs
path: server_logs

- name: Report to Slack on Failure
if: always()
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ job.status }}
notification_title: ''
message_format: '{emoji} *{workflow}* has {status_message}'
footer: '{run_url}'
notify_when: 'failure,warnings'
mention_users: 'U025MDH5KS6,U01JEUX1J2Y,U01J8Q1HUBC'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}

0 comments on commit 48d6001

Please sign in to comment.