From ab4d30d9b98578c454a79dfdac482a25094e04a0 Mon Sep 17 00:00:00 2001 From: Alexander Bigga Date: Mon, 2 Dec 2024 10:32:00 +0100 Subject: [PATCH] Speed up Github workflow with npm cache (#777) --- .github/workflows/build-test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index d39a811..e0c8c2e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -31,6 +31,14 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} + - name: Cache .npm directory + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Install npm packages run: npm ci