From 4b8f97e4aa655c698c3e8322bc2e85c3f8777e54 Mon Sep 17 00:00:00 2001 From: Igor Tatarnikov <61896994+IgorTatarnikov@users.noreply.github.com> Date: Fri, 8 Nov 2024 16:34:00 +0000 Subject: [PATCH 1/2] Notify slack on scheduled test failure (#60) --- .github/workflows/test_and_deploy.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 1cdc1ad8..684e5d12 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -166,8 +166,18 @@ jobs: run: | python -m pytest --color=yes -v tests/brainmapper + - name: Notify slack on scheduled failure + if: failure() && github.event_name == 'schedule' + uses: ravsamhq/notify-slack-action@v2 + with: + status: ${{ job.status }} # required + notify_when: 'failure' + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFYBOT_WEBHOOK_URL }} # required + + build_sdist_wheel: - name: Build source distribution and wheel + name: Build source distribution needs: [test, test_numba_disabled] if: github.event_name == 'push' && github.ref_type == 'tag' runs-on: ubuntu-latest From 225577ee9c344acd86db85581d36d23a1372e2b2 Mon Sep 17 00:00:00 2001 From: IgorTatarnikov Date: Mon, 11 Nov 2024 15:52:54 +0000 Subject: [PATCH 2/2] Added slack notification step after tests and tests with numba disabled --- .github/workflows/test_and_deploy.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 684e5d12..5e2bfe97 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -86,6 +86,15 @@ jobs: secret-codecov-token: ${{ secrets.CODECOV_TOKEN }} use-xvfb: true + - name: Notify slack on scheduled failure + if: failure() && github.event_name == 'schedule' + uses: ravsamhq/notify-slack-action@v2 + with: + status: ${{ job.status }} # required + notify_when: 'failure' + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFYBOT_WEBHOOK_URL }} # required + test_numba_disabled: needs: [linting, manifest] name: Run tests with numba disabled @@ -125,6 +134,15 @@ jobs: secret-codecov-token: ${{ secrets.CODECOV_TOKEN }} codecov-flags: "numba" + - name: Notify slack on scheduled failure + if: failure() && github.event_name == 'schedule' + uses: ravsamhq/notify-slack-action@v2 + with: + status: ${{ job.status }} # required + notify_when: 'failure' + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFYBOT_WEBHOOK_URL }} # required + # Run brainglobe-workflows brainmapper-CLI tests to check for # breakages test_brainmapper_cli: @@ -166,15 +184,6 @@ jobs: run: | python -m pytest --color=yes -v tests/brainmapper - - name: Notify slack on scheduled failure - if: failure() && github.event_name == 'schedule' - uses: ravsamhq/notify-slack-action@v2 - with: - status: ${{ job.status }} # required - notify_when: 'failure' - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFYBOT_WEBHOOK_URL }} # required - build_sdist_wheel: name: Build source distribution