From b7e247f66b13f7c7def188458483b6c71fb63264 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 24 Mar 2026 09:14:59 +0800 Subject: [PATCH] combine cache --- .github/workflows/style.yml | 7 +++++++ web/package.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 65b476532d..0acdf35076 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -84,6 +84,13 @@ jobs: if: steps.changed-files.outputs.any_changed == 'true' uses: ./.github/actions/setup-web + - name: Restore ESLint cache + if: steps.changed-files.outputs.any_changed == 'true' + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: web/.eslintcache + key: ${{ runner.os }}-web-eslint-${{ hashFiles('web/package.json', 'web/pnpm-lock.yaml', 'web/eslint.config.mjs', 'web/eslint.constants.mjs', 'web/plugins/eslint/**') }} + - name: Web style check if: steps.changed-files.outputs.any_changed == 'true' working-directory: ./web diff --git a/web/package.json b/web/package.json index b9b47a25b9..ee8dbb466e 100644 --- a/web/package.json +++ b/web/package.json @@ -38,8 +38,8 @@ "gen-icons": "node ./scripts/gen-icons.mjs && eslint --fix app/components/base/icons/src/", "i18n:check": "tsx ./scripts/check-i18n.js", "knip": "knip", - "lint": "eslint --concurrency=auto", - "lint:ci": "eslint --concurrency 2", + "lint": "eslint --cache --concurrency=auto", + "lint:ci": "eslint --cache --cache-strategy content --concurrency 2", "lint:fix": "vp run lint --fix", "lint:quiet": "vp run lint --quiet", "lint:tss": "tsslint --project tsconfig.json",