Merge pull request #21 from chronoDave/#20 #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: [push, pull_request] | |
jobs: | |
ci: | |
name: Lint & Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.3.4 | |
- name: Install Node | |
uses: actions/setup-node@v2.1.3 | |
- 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 |