File tree Expand file tree Collapse file tree 1 file changed +39
-7
lines changed
Expand file tree Collapse file tree 1 file changed +39
-7
lines changed Original file line number Diff line number Diff line change 1+
12name : nodejs
23
34on :
45 push :
5- pull_request :
6+ paths :
7+ - ' **/**'
8+ - ' !**/docs/**'
9+
10+
11+ env :
12+ CI : true
13+ FORCE_COLOR : 2
14+
615
716jobs :
8- build :
9- runs-on : ubuntu-latest
17+ run :
18+ name : Node ${{ matrix.node }} on ${{ matrix.os }}
19+ runs-on : ${{ matrix.os }}
1020
1121 strategy :
22+ fail-fast : false
1223 matrix :
13- node-version : ["10", "12", "14"]
24+ node : ["10.x", "12.x", "14.x"]
25+ os : ["ubuntu-latest"]
1426
1527 steps :
16- - uses : actions/checkout@v2
28+ - uses : actions/checkout@v2.3.4
1729 - name : Use Node.js ${{ matrix.node-version }}
18- uses : actions/setup-node@v1
30+ uses : actions/setup-node@v2.1.4
1931 with :
2032 node-version : ${{ matrix.node-version }}
21- - run : npm install
33+
34+
35+ - name : Get npm cache directory
36+ id : npm-cache-dir
37+ run : |
38+ echo "::set-output name=dir::$(npm config get cache)"
39+ - uses : actions/cache@v2
40+ id : npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
41+ with :
42+ path : ${{ steps.npm-cache-dir.outputs.dir }}
43+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
44+ restore-keys : |
45+ ${{ runner.os }}-node-
46+
47+
48+ - name : npm install, build, and test
49+ run : |
50+ npm install
51+ npm run ci
52+ env :
53+ CI : true
You can’t perform that action at this time.
0 commit comments