From 8e1e6c630bff9746b0168f692ce8b144f07bca2d Mon Sep 17 00:00:00 2001 From: Alexander Bigga Date: Mon, 2 Dec 2024 10:15:31 +0100 Subject: [PATCH] Speed up Github workflow with npm cache --- .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