Skip to content

Commit

Permalink
Merge pull request #7934 from Agoric/mfig-ci-notifications
Browse files Browse the repository at this point in the history
ci: send test failure notifications when not a PR
  • Loading branch information
michaelfig authored and mhofman committed Aug 7, 2023
2 parents 6d5f5ff + 9aea7b4 commit ac1c923
Show file tree
Hide file tree
Showing 9 changed files with 220 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/actions/notify-status/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ description: 'Notify on actions status'
inputs:
from:
description: 'The email address to send the notification from'
required: true
required: false
to:
description: 'Recipients'
required: true
required: false
password:
description: 'Sendgrid Password'
required: true
required: false
webhook:
description: 'Slack webhook URL'
required: true
Expand All @@ -19,7 +19,8 @@ runs:
using: composite
steps:
- name: send ${{ job.status }} email
uses: dawidd6/action-send-mail@v2
if: ${{ inputs.to != '' }}
uses: dawidd6/action-send-mail@v3
with:
# mail server settings
server_address: smtp.sendgrid.net
Expand All @@ -42,7 +43,7 @@ runs:
from: ${{ inputs.from }}
- name: Send GitHub trigger payload
id: slack
uses: slackapi/slack-github-action@v1.18.0
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
{
Expand Down
152 changes: 151 additions & 1 deletion .github/workflows/test-all-packages.yml

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .github/workflows/test-dapp-card-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,12 @@ jobs:
- name: yarn test in dapp
run: yarn test
working-directory: ./dapp

- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}
9 changes: 9 additions & 0 deletions .github/workflows/test-dapp-fungible-faucet.yml.DISABLED
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,12 @@ jobs:
- name: yarn test in dapp
run: yarn test
working-directory: ./dapp

- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}
9 changes: 9 additions & 0 deletions .github/workflows/test-dapp-otc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,12 @@ jobs:
- name: yarn test in dapp
run: yarn test
working-directory: ./dapp

- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}
9 changes: 9 additions & 0 deletions .github/workflows/test-dapp-pegasus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,12 @@ jobs:
- name: yarn test in dapp
run: yarn test
working-directory: ./dapp

- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}
9 changes: 9 additions & 0 deletions .github/workflows/test-dapp-simple-exchange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,12 @@ jobs:
- name: yarn test in dapp
run: yarn test
working-directory: ./dapp

- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}
9 changes: 9 additions & 0 deletions .github/workflows/test-dapp-treasury.yml.DISABLED
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,12 @@ jobs:
- name: yarn test in dapp
run: yarn test
working-directory: ./dapp

- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}
9 changes: 9 additions & 0 deletions .github/workflows/test-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,12 @@ jobs:
- name: yarn test in dapp
run: yarn test
working-directory: ./dapp

- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}

0 comments on commit ac1c923

Please sign in to comment.