mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Cache node_modules in workflows
This commit is contained in:
parent
47d1da0476
commit
46ac6f2211
10
.github/workflows/darwin.yml
vendored
10
.github/workflows/darwin.yml
vendored
@ -21,7 +21,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 12.x
|
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
|
- name: Installing NPM packages
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
10
.github/workflows/ubuntu.yml
vendored
10
.github/workflows/ubuntu.yml
vendored
@ -21,7 +21,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 12.x
|
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
|
- name: Installing NPM packages
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
10
.github/workflows/windows.yml
vendored
10
.github/workflows/windows.yml
vendored
@ -21,7 +21,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 12.x
|
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
|
- name: Installing NPM packages
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
Loading…
Reference in New Issue
Block a user