From fcac4f74c2cfd878d5a87b8ab4fd92029f95c488 Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 11 Aug 2026 13:53:25 +0200 Subject: [PATCH] chore: enable vp task caching (#32729) --- .github/workflows/default.yml | 17 +++++++++++++++++ vite.config.ts | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index e67e863aa..eec98c9e5 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -132,6 +132,15 @@ jobs: - name: Install run: make install-ui + - name: Restore vp task cache + id: vp-cache + uses: actions/cache/restore@v6 + with: + path: node_modules/.vite/task-cache + key: ${{ runner.os }}-${{ runner.arch }}-vp-${{ github.run_id }}-${{ github.run_attempt }} + restore-keys: | + ${{ runner.os }}-${{ runner.arch }}-vp- + - name: OpenAPI # backport release tags may not have the openapi target yet run: if grep -q '^openapi' Makefile; then make openapi; fi @@ -148,6 +157,14 @@ jobs: - name: Build UI run: make ui + - name: Save vp task cache + # avoid cache thrashing by nightly and pull requests + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + uses: actions/cache/save@v6 + with: + path: node_modules/.vite/task-cache + key: ${{ steps.vp-cache.outputs.cache-primary-key }} + - name: Cache dist # avoid cache thrashing by nightly if: github.event_name == 'push' || github.event_name == 'pull_request' diff --git a/vite.config.ts b/vite.config.ts index 9709c3bf0..122e25eed 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,6 +10,11 @@ const frontendPort = Number(process.env.VITE_PORT) || 7071; const backendUrl = `http://localhost:${Number(process.env.VITE_BACKEND_PORT) || 7070}`; export default defineConfig({ + run: { + cache: { + scripts: true, + }, + }, staged: { "*": "vp check --fix", },