From 35d3f364d3afaa2bbcdc67117664d17cf70d9c13 Mon Sep 17 00:00:00 2001 From: Darius Jahandarie Date: Sat, 28 Dec 2024 22:35:31 +0900 Subject: [PATCH] add node_modules caching for when package-lock hasn't changed --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e3a34eaa..6f5f8f37e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,15 @@ jobs: with: node-version-file: "package.json" + - name: Restore dependencies + id: restore-dependencies + uses: actions/cache@v4 + with: + path: node_modules + key: js-depend-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} + - name: Install dependencies + if: steps.restore-dependencies.outputs.cache-hit != 'true' run: npm ci - name: Build third-party libraries