File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,29 @@ on: [push]
44
55jobs :
66 build :
7-
87 runs-on : ubuntu-latest
98 steps :
109 - uses : actions/checkout@v1
10+ - name : Cache
11+ id : cache
12+ 13+ with :
14+ path : node_modules
15+ key : ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
16+ restore-keys : |
17+ ${{ runner.OS }}-build-${{ env.cache-name }}-
18+ ${{ runner.OS }}-build-
19+ ${{ runner.OS }}-
1120 - name : Use Node.js ${{ matrix.node-version }}
1221 uses : actions/setup-node@v1
1322 with :
1423 node-version : 12
15- - name : npm install, build, and test
16- run : |
17- npm ci
18- npm run build --if-present
19- npm test
24+ - name : Install Dependencies
25+ if : steps.cache.outputs.cache-hit != 'true'
26+ run : npm ci
27+ env :
28+ CI : true
29+ - name : npm test
30+ run : npm test
2031 env :
2132 CI : true
You can’t perform that action at this time.
0 commit comments