diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 738f5521..cb885490 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,15 @@ jobs: node-version: '18.x' registry-url: 'https://registry.npmjs.org' + - name: Cache node modules + id: nodemodules-cache + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} + - name: Install dependencies + if: steps.nodemodules-cache.outputs.cache-hit != 'true' run: npm ci - name: build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88dd9e27..152e9696 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,15 @@ jobs: node-version: '18.x' cache: 'npm' + - name: Cache node modules + id: nodemodules-cache + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} + - name: Install dependencies + if: steps.nodemodules-cache.outputs.cache-hit != 'true' run: npm ci - name: Run tests