fix(ci): add restore-keys for improved cache efficiency

This commit is contained in:
taroj1205 2025-06-18 16:02:53 +12:00
parent 1eff2accb2
commit 51015da659
No known key found for this signature in database
GPG key ID: 0FCB6CFFE0981AB7

View file

@ -49,16 +49,6 @@ jobs:
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
lookup-only: true
- name: Setup cache for node_modules
if: steps.check-node-modules-cache.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: |
node_modules
*/node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-node-modules-
- name: Setup Node.js
uses: actions/setup-node@v4
with:
@ -75,6 +65,15 @@ jobs:
if: steps.check-node-modules-cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Save node_modules cache
if: steps.check-node-modules-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
node_modules
*/node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
quality_checks:
name: ${{ matrix.name }}
needs: [check_changes, setup]