-
Notifications
You must be signed in to change notification settings - Fork 12
40 lines (35 loc) · 879 Bytes
/
js.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
name: JS tests
on: [push, pull_request]
jobs:
js-linter:
name: JS linter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: npm
cache-dependency-path: '_dev/package-lock.json'
- name: Lint JS files
working-directory: _dev
run: |
npm install
npm run lint
unit-tests:
name: JS Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: npm
cache-dependency-path: '_dev/package-lock.json'
- name: Install & run
working-directory: _dev
run: |
npm install
npm run test:unit