Skip to content

Commit e0f1f97

Browse files
authored
Run specs once a day (#13)
* Run specs daily * Add slack notifications
1 parent cd26d80 commit e0f1f97

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/health_check.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Health check
2+
on:
3+
schedule:
4+
- cron: '0 9 * * * America/Los_Angeles'
5+
6+
jobs:
7+
build-and-test:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node: ['10', '12', '14']
12+
name: Node ${{ matrix.node }} Test
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@v2
16+
17+
- name: Setup Node
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node }}
21+
- name: Install Node Modules
22+
run: npm install
23+
- name: Build package
24+
run: npm run build
25+
- name: Run tests
26+
env:
27+
SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }}
28+
run: npm test
29+
30+
failure-notification:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- run: exit 1
35+
- name: Health check failure
36+
if: always()
37+
uses: kpritam/slack-job-status-action@v1
38+
with:
39+
job-status: ${{ job.status }}
40+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
41+
channel: github-actions

0 commit comments

Comments
 (0)