fix(actions): use inbuilt cache with setup-node (#42730)
This commit is contained in:
committed by
GitHub
parent
d771569ad9
commit
0a0caf18ae
14
.github/workflows/cypress.yml
vendored
14
.github/workflows/cypress.yml
vendored
@ -40,19 +40,7 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
cache: 'npm'
|
||||
|
||||
- name: Set freeCodeCamp Environment Variables
|
||||
run: cp sample.env .env
|
||||
|
14
.github/workflows/node.js-tests-upcoming.yml
vendored
14
.github/workflows/node.js-tests-upcoming.yml
vendored
@ -27,19 +27,7 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
cache: 'npm'
|
||||
|
||||
- name: Set Environment variables
|
||||
run: |
|
||||
|
14
.github/workflows/node.js-tests.yml
vendored
14
.github/workflows/node.js-tests.yml
vendored
@ -22,19 +22,7 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
cache: 'npm'
|
||||
|
||||
- name: Set Environment variables
|
||||
run: cp sample.env .env
|
||||
|
Reference in New Issue
Block a user