Skip to content

Commit

Permalink
Notify only on failure, add a test that always fails
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Nov 5, 2024
1 parent 4d4c9f6 commit a24f219
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ jobs:
name: Notify slack on scheduled failure
runs-on: ubuntu-latest
needs: [test]
# if: github.event_name == 'schedule'
steps:
- uses: ravsamhq/notify-slack-action@v2
if: ${{ github.event_name != 'schedule' }}
if: ${{ github.event_name == 'schedule' }}
with:
status: ${{ job.status }} # required
notify_when: 'success,failure,cancelled'
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFYBOT_WEBHOOK_URL }} # required

Expand Down
4 changes: 4 additions & 0 deletions tests/test_unit/test_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ def test_tile_init():
assert tile.channel_name == ""
assert tile.illumination_id == illumination_id
assert tile.angle == angle


def test_always_fail():
assert False

0 comments on commit a24f219

Please sign in to comment.