add node modules caching

This commit is contained in:
Konstantin Vyatkin 2019-11-07 21:39:26 -04:00
parent 5283e4bcc2
commit 2576241907
No known key found for this signature in database
GPG key ID: F1391F5143047BDF

View file

@ -44,6 +44,17 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- run: |
npm ci
npm run build
@ -96,9 +107,15 @@ jobs:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
- name: Cache node modules
uses: actions/cache@v1
with:
node-version: '12.x'
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- run: |
npm ci
npm run build