From 85654665039450b710af30f9853707221d901f87 Mon Sep 17 00:00:00 2001 From: Christian Kaatz Date: Thu, 28 Sep 2023 10:16:01 +0200 Subject: [PATCH] Enable caching in CI --- .github/workflows/ci-pipeline.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 260b8712..c85ee0eb 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -26,6 +26,25 @@ jobs: node-version: "18.18.0" cache: "npm" + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + 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 }}- + + - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} + name: List the state of node modules + continue-on-error: true + run: npm list + - run: npm install - name: Set up playwright