Skip to content

Commit

Permalink
Add send email action in nightly workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lahirumaramba committed Mar 30, 2021
1 parent 83d133c commit e2f17d3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,29 @@ jobs:
with:
name: dist
path: dist

- name: Send email on failure
if: failure()
uses: ./.github/actions/send-email
with:
api-key: ${{ secrets.OSS_BOT_MAILGUN_KEY }}
domain: ${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}
from: 'GitHub <admin-github@${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}>'
to: ${{ secrets.ADMIN_GITHUB_NOTIFICATION_EMAIL }}
subject: '[${{github.repository}}] Nightly build failed!'
html: >
<b>Nightly build failed on:</b> github.com/${{github.repository}}
continue-on-error: true

- name: Send email on cancelled
if: cancelled()
uses: ./.github/actions/send-email
with:
api-key: ${{ secrets.OSS_BOT_MAILGUN_KEY }}
domain: ${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}
from: 'GitHub <admin-github@${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}>'
to: ${{ secrets.ADMIN_GITHUB_NOTIFICATION_EMAIL }}
subject: '[${{github.repository}}] Nightly build got cancelled!'
html: >
<b>Nightly build got cancelled on:</b> github.com/${{github.repository}}
continue-on-error: true
6 changes: 6 additions & 0 deletions test/integration/remote-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ describe('admin.remoteConfig', () => {
}).to.throw('Cannot set property etag of #<RemoteConfigTemplateImpl> which has only a getter');
});

// A failing integration test to trigger the send email action.
// Remove this once the testing is complete.
it('A failing integration test to nightly email notifications', () => {
expect('a').to.be.equal('b');
});

describe('validateTemplate', () => {
it('should succeed with a vaild template', () => {
// set parameters, groups, and conditions
Expand Down

0 comments on commit e2f17d3

Please sign in to comment.