From f833701a4a2f9885a829e777b1f6ffadd4084af9 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:07:44 +0800 Subject: [PATCH] ci: enable vite task cache --- .github/actions/setup-web/action.yml | 3 ++- .github/workflows/style.yml | 4 ++-- web/vite.config.ts | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-web/action.yml b/.github/actions/setup-web/action.yml index 673155bcf7..b5b4e0870f 100644 --- a/.github/actions/setup-web/action.yml +++ b/.github/actions/setup-web/action.yml @@ -1,10 +1,11 @@ name: Setup Web Environment +description: A GitHub Action to set up the web environment using Vite+. runs: using: composite steps: - name: Setup Vite+ - uses: voidzero-dev/setup-vp@20553a7a7429c429a74894104a2835d7fed28a72 # v1.3.0 + uses: hyoban/setup-vp@96511aa421048609564ade4427c73d0078d4afc1 # v1.3.0 with: node-version-file: .nvmrc cache: true diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 9bc4ceaa93..7a834ba028 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -106,12 +106,12 @@ jobs: - name: Web tsslint if: steps.changed-files.outputs.any_changed == 'true' working-directory: ./web - run: vp run lint:tss + run: vp run lint:tss --cache - name: Web type check if: steps.changed-files.outputs.any_changed == 'true' working-directory: ./web - run: vp run type-check + run: vp run type-check --cache - name: Web dead code check if: steps.changed-files.outputs.any_changed == 'true' diff --git a/web/vite.config.ts b/web/vite.config.ts index 28746f81ca..37a4be7f50 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -84,5 +84,12 @@ export default defineConfig(({ mode }) => { reporter: isCI ? ['json', 'json-summary'] : ['text', 'json', 'json-summary'], }, }, + + tasks: { + 'type-check': { + command: 'tsc --noEmit', + input: [{ auto: true }, '!**/*.tsbuildinfo'], + }, + }, } })