From 095f03e9baef95281364dc3472e254f9e2776cba Mon Sep 17 00:00:00 2001 From: Gauthier Fiorentino Date: Thu, 14 Mar 2024 16:57:12 +0100 Subject: [PATCH] CI: Remove node modules cache and instead use prefer-offline --- .github/workflows/build.yml | 9 +-------- .github/workflows/tests.yml | 8 +------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 92f574b..87bc341 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,15 +14,8 @@ jobs: # TODO: add version to a .nvmrc or at least a variable node-version: 18.12.1 cache: npm - - name: Cache node modules - id: cache-packages - uses: actions/cache@v3 - with: - path: ./node_modules - key: ${{ hashFiles('package-lock.json') }} - name: Install - if: ${{ steps.cache-packages.outputs.cache-hit != 'true' }} - run: npm ci --omit=dev + run: npm ci --omit=dev --prefer-offline - name: Build run: npm run build - name: Upload artifact diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cadcfbb..c4b8e05 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,13 +14,7 @@ jobs: # TODO: add version to a .nvmrc or at least a variable node-version: 18.12.1 cache: npm - - name: Cache node modules - id: cache-packages - uses: actions/cache@v3 - with: - path: ./node_modules - key: ${{ hashFiles('package-lock.json') }} - name: Install - run: npm ci + run: npm ci --prefer-offline - name: Run tests run: npm run test:unit