File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Run tests on Push or Pull Request
1+ name : Run tests on Pull Request or Push
22on :
33 push :
44 branches :
55 - master
66 pull_request :
77 branches :
88 - master
9+ types :
10+ - opened
11+ - synchronize
12+ - reopened
13+ - ready_for_review
914jobs :
10- tests :
11- name : Run Tests
15+ test :
16+ name : Run tests
1217 runs-on : ubuntu-latest
1318 steps :
14- - uses : actions/checkout@v2
15- - uses : actions/setup-node@v1
16- with :
17- node-version : 12.x
18- - run : npm install
19- - run : npm test
20- - run : npm run lint
19+ - name : Clone repository
20+ uses : actions/checkout@v2
21+
22+ - name : Set up Node.js
23+ uses : actions/setup-node@v2
24+ with :
25+ node-version : 14.x
26+
27+ - name : Set up npm cache
28+ uses : actions/cache@v2
29+ with :
30+ path : ~/.npm
31+ key : ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
32+ restore-keys : |
33+ ${{ runner.OS }}-${{ hashFiles('package-lock.json') }}
34+ ${{ runner.OS }}
35+
36+ - name : Install npm dependencies
37+ run : npm ci
38+
39+ - name : Run test agains code
40+ run : npm run test
41+
42+ - name : Lint code for code-style errors
43+ run : npm run lint
You can’t perform that action at this time.
0 commit comments