Skip to content

Commit

Permalink
Introduce slack messages when github actions fail on main
Browse files Browse the repository at this point in the history
Authored-by: Jenna Goldstrich <[email protected]>
  • Loading branch information
Jenna Goldstrich committed Apr 7, 2021
1 parent bce2639 commit 4a23a41
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
run: bundle install
- name: Run Rubocop
run: bundle exec rake rubocop
- uses: ravsamhq/[email protected]
if: always()
with:
status: ${{ job.status }}
notify_when: 'failure' # default is 'success,failure,warnings'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
test_postgres:
runs-on: ubuntu-latest
container:
Expand All @@ -29,6 +36,13 @@ jobs:
run: service postgresql restart
- name: Run tests
run: DB=postgres bundle exec rake spec:all
- uses: ravsamhq/[email protected]
if: always()
with:
status: ${{ job.status }}
notify_when: 'failure' # default is 'success,failure,warnings'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
test_mysql:
runs-on: ubuntu-latest
container:
Expand All @@ -43,6 +57,13 @@ jobs:
service mysql restart
- name: Run tests
run: DB=mysql bundle exec rake spec:all
- uses: ravsamhq/[email protected]
if: always()
with:
status: ${{ job.status }}
notify_when: 'failure' # default is 'success,failure,warnings'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
test_docs:
runs-on: ubuntu-latest
container:
Expand All @@ -57,4 +78,10 @@ jobs:
cd -
- name: Run docs tests
run: bundle exec rake check_doc_links

- uses: ravsamhq/[email protected]
if: always()
with:
status: ${{ job.status }}
notify_when: 'failure' # default is 'success,failure,warnings'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required

0 comments on commit 4a23a41

Please sign in to comment.