-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce slack messages when github actions fail on main
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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: | ||
|
@@ -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: | ||
|
@@ -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 |