From 38e0f612d0a53b258016e6be29ef9f3a5e590894 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 26 Aug 2025 17:37:33 +0100 Subject: [PATCH] Cache NPM packages in CI --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f7e9d5d..946bd2ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -335,6 +335,19 @@ jobs: target/ key: ${{ github.job }}-${{ runner.os }}-${{ matrix.target.architecture }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Get npm cache directory + id: npm-cache-dir + shell: bash + run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} + if: startsWith(runner.os, 'Linux') + + - uses: actions/cache@v4 + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Install Rust i686-pc-windows-msvc target run: rustup target add i686-pc-windows-msvc if: matrix.target.platform == 'Win32'