diff --git a/.github/workflows/13-caching.yaml b/.github/workflows/13-caching.yaml index b05ca5a..a7e1415 100644 --- a/.github/workflows/13-caching.yaml +++ b/.github/workflows/13-caching.yaml @@ -29,7 +29,15 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ inputs.node-version }} + - name: Download cached dependencies + uses: actions/cache@v3 + if: ${{ inputs.use-cache }} + id: cache + with: + path: 13-caching/react-app/node_modules + key: deps-node-modules-${{ hashFiles('13-caching/react-app/package-lock.json') }} - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' run: npm ci - name: Testing run: npm run test