-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (33 loc) · 1.05 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: ci
on: [push, pull_request]
jobs:
ci:
name: Lint & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install Node
uses: actions/[email protected]
- name: Cache packages
uses: actions/cache@v2
with:
path: ~/.npm
key: node-${{ hashFiles('**/package-lock.json') }}
restore-keys: node-
- name: Install packages
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Discord Webhook (Success)
if: ${{success()}}
run: |
wget https://raw.githubusercontent.com/chronoDave/user-scripts/master/webhooks/github_discord.js
node ./github_discord.js ${{secrets.WEBHOOK_URL}} success
- name: Discord Webhook (Failure)
if: ${{failure()}}
run: |
wget https://raw.githubusercontent.com/chronoDave/user-scripts/master/webhooks/github_discord.js
node ./github_discord.js ${{secrets.WEBHOOK_URL}} error