From c2f1a1e162566e0bd64a41b171ea62d9bd091f5d Mon Sep 17 00:00:00 2001 From: Saugat Pachhai Date: Wed, 5 May 2021 18:37:33 +0545 Subject: [PATCH] Notify CI failures to Slack (#5970) --- .github/workflows/tests.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0c2269e73..0ebbc0ab4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -98,3 +98,18 @@ jobs: with: file: ./coverage.xml fail_ci_if_error: false + notify: + if: github.ref == 'refs/heads/master' && failure() + needs: + - lint + - tests + runs-on: ubuntu-latest + steps: + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_COLOR: ${{ job.status }} + SLACK_MESSAGE: 'CI Failed on master :boom:' + SLACK_TITLE: CI Status + SLACK_USERNAME: DVC-CI