Cache node_modules in workflows

This commit is contained in:
Shivam Mathur 2019-11-02 22:09:42 +05:30
parent 47d1da0476
commit 46ac6f2211
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 30 additions and 0 deletions

View File

@ -21,7 +21,17 @@ jobs:
with:
node-version: 12.x
- name: Cache node modules
uses: actions/cache@preview
id: cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Installing NPM packages
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
- name: Run tests

View File

@ -21,7 +21,17 @@ jobs:
with:
node-version: 12.x
- name: Cache node modules
uses: actions/cache@preview
id: cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Installing NPM packages
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
- name: Run tests

View File

@ -21,7 +21,17 @@ jobs:
with:
node-version: 12.x
- name: Cache node modules
uses: actions/cache@preview
id: cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**\package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Installing NPM packages
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
- name: Run tests