From 2723f00cb8bf069d3b9b4c8482df042482e9c8de Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Wed, 13 Oct 2021 17:01:39 +0200 Subject: [PATCH] ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#1382) --- .github/workflows/generate-theme-doc.yml | 3 ++- .github/workflows/test.yml | 14 ++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index 9028044..2ff488a 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -14,9 +14,10 @@ jobs: steps: - uses: actions/checkout@v1 - name: setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: "12.x" + cache: npm - name: npm install, generate readme run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0eb0221..95eacb1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,20 +16,10 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: "12.x" - - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - with: - path: ~/.npm - key: - ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm-cache- + cache: npm - name: Install & Test run: |