Skip to content

Commit

Permalink
Setup slack notifications for cron jobs (#410)
Browse files Browse the repository at this point in the history
* DEV : Setup slack notifications for cron jobs

	modified:   .github/workflows/weekly-scheduled-tests.yml

* DEV : Use a single notification for both cron jobs

Earlier, we used separate slack notifications for each of the two cron
jobs in this repository. With this commit, we simply use a single slack
notification to indicate job failure on either cron jobs.

	modified:   .github/workflows/weekly-scheduled-tests.yml
  • Loading branch information
Poruri Sai Rahul committed Jul 13, 2021
1 parent 5957871 commit 82aa372
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/weekly-scheduled-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
cd testdir
python -X faulthandler -m unittest discover -v traits_futures
test-bleeding-edge:
strategy:
matrix:
Expand Down Expand Up @@ -72,3 +71,31 @@ jobs:
with:
working-directory: ${{ runner.temp }}
run: python -X faulthandler -m unittest discover -v traits_futures

notify-on-failure:
needs: [test-all-platform-python-combinations, test-bleeding-edge]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on failure
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_BOTS_SLACK_CHANNEL_ID }}
status: FAILED
color: danger
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}

notify-on-success:
needs: [test-all-platform-python-combinations, test-bleeding-edge]
if: success()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on success
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_BOTS_SLACK_CHANNEL_ID }}
status: SUCCESS
color: good
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}

0 comments on commit 82aa372

Please sign in to comment.