diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml index 85d8519e..2cdd4e4c 100644 --- a/.github/workflows/integration-tests.yaml +++ b/.github/workflows/integration-tests.yaml @@ -5,6 +5,8 @@ on: pull_request: branches: - main + schedule: + - cron: "0 8 * * 1" # every monday at 8am UTC name: integration-tests @@ -56,3 +58,21 @@ jobs: license: ${{ secrets.CONNECT_LICENSE_FILE }} command: | Rscript -e 'source("tests/test-integrated.R")' + + slack-notification: + needs: integration-tests + if: ${{ failure() && github.event_name == 'schedule' }} + runs-on: ubuntu-latest + steps: + - name: Notify Slack of CI failure + uses: slackapi/slack-github-action@v2.1.1 + with: + webhook: ${{ secrets.SLACK_WEBHOOK }} + webhook-type: incoming-webhook + payload: | + text: ":x: connectapi nightly integration tests failed" + blocks: + - type: section + text: + type: mrkdwn + text: "View run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"