-
Notifications
You must be signed in to change notification settings - Fork 26
49 lines (44 loc) · 1.03 KB
/
test.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
##
# Run tests
##
name: Tests
on:
pull_request:
push:
jobs:
pre_build:
runs-on: ubuntu-latest
steps:
- uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
cancel_others: true
test:
name: Run Tests
needs: pre_build
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Setup repo
run: cp config.example.js config.js
shell: bash
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install deps
run: npm install
- run: npm run lint
- run: npm test
notify:
name: Notify Slack
needs: test
if: ${{ success() || failure() }}
runs-on: ubuntu-latest
steps:
- uses: iRoachie/[email protected]
if: env.SLACK_WEBHOOK_URL != null
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BUILDS_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}