ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#8748)

This commit is contained in:
Oscar Dominguez
2021-10-12 22:10:17 +02:00
committed by GitHub
parent aff49835ee
commit 432fc0ff93
4 changed files with 18 additions and 38 deletions

View File

@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16']
node: ["16"]
name: Node ${{ matrix.node }}
steps:
- name: Cancel Previous Runs
@@ -26,18 +26,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
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: Install Dependencies
run: npm ci