File tree Expand file tree Collapse file tree 1 file changed +23
-14
lines changed Expand file tree Collapse file tree 1 file changed +23
-14
lines changed Original file line number Diff line number Diff line change @@ -5,29 +5,38 @@ name: Node.js CI
5
5
6
6
on :
7
7
push :
8
- branches : [ master ]
8
+ branches : [master]
9
9
pull_request :
10
- branches : [ master ]
10
+ branches : [master]
11
11
12
12
jobs :
13
13
build :
14
-
15
14
runs-on : ubuntu-latest
16
15
17
16
strategy :
18
17
matrix :
19
18
node-version : [12.x]
20
19
21
20
steps :
22
- - uses : actions/checkout@v2
23
- - name : Use Node.js ${{ matrix.node-version }}
24
- uses : actions/setup-node@v1
25
- with :
26
- node-version : ${{ matrix.node-version }}
27
- - run : npm ci
28
- - run : npm run coverage
21
+ - name : Get npm cache directory
22
+ id : npm-cache
23
+ run : |
24
+ echo "::set-output name=dir::$(npm config get cache)"
25
+ - uses : actions/cache@v2
26
+ with :
27
+ path : ${{ steps.npm-cache.outputs.dir }}
28
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29
+ restore-keys : |
30
+ ${{ runner.os }}-node-
31
+ - uses : actions/checkout@v2
32
+ - name : Use Node.js ${{ matrix.node-version }}
33
+ uses : actions/setup-node@v1
34
+ with :
35
+ node-version : ${{ matrix.node-version }}
36
+ - run : npm ci
37
+ - run : npm run coverage
29
38
30
- - name : Coveralls
31
- uses : coverallsapp/github-action@master
32
- with :
33
- github-token : ${{ secrets.GITHUB_TOKEN }}
39
+ - name : Coveralls
40
+ uses : coverallsapp/github-action@master
41
+ with :
42
+ github-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments