diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3b396b201..4fe757b1a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -82,3 +82,18 @@ jobs: flags: ${{ matrix.python-version }} token: ${{ secrets.CODECOV_TOKEN }} verbose: true + notifications: + name: Regression notifications + runs-on: ubuntu-latest + needs: build + if: failure() && github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' + steps: + - name: Send notifications of failing tests + uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0 + with: + errors: true + webhook: ${{ secrets.SLACK_REGRESSION_FAILURES_WEBHOOK_URL }} + webhook-type: webhook-trigger + payload: | + action_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + repository: "${{ github.repository }}"