diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d80cb46..92f574b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,12 +15,14 @@ jobs: 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 + if: ${{ steps.cache-packages.outputs.cache-hit != 'true' }} + run: npm ci --omit=dev - name: Build run: npm run build - name: Upload artifact diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5a09637..cadcfbb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,6 +14,12 @@ 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 - name: Run tests