Skip to content

Commit fc5f294

Browse files
committed
Add send email action in nightly workflow
1 parent 83d133c commit fc5f294

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/nightly.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,29 @@ jobs:
6666
with:
6767
name: dist
6868
path: dist
69+
70+
- name: Send email on failure
71+
if: failure()
72+
uses: ./.github/actions/send-email
73+
with:
74+
api-key: ${{ secrets.OSS_BOT_MAILGUN_KEY }}
75+
domain: ${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}
76+
from: 'GitHub <admin-github@${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}>'
77+
to: ${{ secrets.ADMIN_GITHUB_NOTIFICATION_EMAIL }}
78+
subject: '[${{github.repository}}] Nightly build failed!'
79+
html: >
80+
<b>Nightly build failed on:</b> github.com/${{github.repository}}
81+
continue-on-error: true
82+
83+
- name: Send email on cancelled
84+
if: cancelled()
85+
uses: ./.github/actions/send-email
86+
with:
87+
api-key: ${{ secrets.OSS_BOT_MAILGUN_KEY }}
88+
domain: ${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}
89+
from: 'GitHub <admin-github@${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}>'
90+
to: ${{ secrets.ADMIN_GITHUB_NOTIFICATION_EMAIL }}
91+
subject: '[${{github.repository}}] Nightly build got cancelled!'
92+
html: >
93+
<b>Nightly build got cancelled on:</b> github.com/${{github.repository}}
94+
continue-on-error: true

test/integration/remote-config.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ describe('admin.remoteConfig', () => {
8888
}).to.throw('Cannot set property etag of #<RemoteConfigTemplateImpl> which has only a getter');
8989
});
9090

91+
// A failing integration test to trigger the send email action.
92+
// Remove this once the testing is complete.
93+
it('A failing integration test to trigger nightly email notifications', () => {
94+
expect('a').to.be.equal('b');
95+
});
96+
9197
describe('validateTemplate', () => {
9298
it('should succeed with a vaild template', () => {
9399
// set parameters, groups, and conditions

0 commit comments

Comments
 (0)