Skip to content

Commit a5180fd

Browse files
Add daily npm install and test workflow (#11)
1 parent b743202 commit a5180fd

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/daily.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Daily - Do npm install and run all unit tests
2+
3+
on:
4+
schedule:
5+
# run daily at midnight
6+
- cron: '0 0 * * *'
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
node: [14]
14+
os: [ubuntu-latest]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- run: npm i --package-lock --package-lock-only
23+
- run: npm ci
24+
- name: run unit tests
25+
run: npm run test
26+
- name: Slack Notification
27+
if: ${{ failure() }}
28+
uses: rtCamp/action-slack-notify@v2
29+
env:
30+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
31+
SLACK_TITLE: 'Node version'
32+
SLACK_MESSAGE: ${{ matrix.node }}
33+
SLACK_COLOR: ${{ job.status == 'success' && 'good' || job.status == 'cancelled' && '#808080' || 'danger' }}
34+

0 commit comments

Comments
 (0)