TypeScript
fix(ci): isolate full workspace dependency caches (#21885)
Julius Marminge6327560a89fa
diff --git a/.github/actions/setup-ci-deps/action.yml b/.github/actions/setup-ci-deps/action.ymlindex ab3fb7deba6..d53722f57dd 100644--- a/.github/actions/setup-ci-deps/action.yml+++ b/.github/actions/setup-ci-deps/action.yml@@ -18,13 +18,34 @@ runs:path: ~/.vite-pluskey: vite-plus-home-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.vp.outputs.version }}+ - name: Setup Vite++ uses: voidzero-dev/setup-vp@v1+ with:+ node-version-file: package.json+ cache: false+ run-install: false++ - name: Resolve pnpm store path+ id: pnpm_store+ shell: bash+ run: |+ store_path="$(vp pm cache dir)"+ echo "path=$store_path" >> "$GITHUB_OUTPUT"++ # setup-vp's shared cache key ignores install filters. Keep full installs in a+ # separate namespace, including fallback restores.# The pnpm store stays a cache tarball on the runner's own disk. A store on a# Blacksmith sticky disk mounts in under a second, but pnpm then copies every# package across filesystems instead of hard-linking it: install took 28-49s# against 9s plus an 11s restore.- - name: Setup Vite+- uses: voidzero-dev/setup-vp@v1+ - name: Cache full pnpm store+ uses: actions/cache@v6with:- node-version-file: package.json- cache: true- run-install: true+ path: ${{ steps.pnpm_store.outputs.path }}+ key: pnpm-full-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', 'package.json') }}+ restore-keys: |+ pnpm-full-v1-${{ runner.os }}-${{ runner.arch }}-++ - name: Install dependencies+ shell: bash+ run: vp installdiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 9b92d4095f2..6217858a06c 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -482,8 +482,6 @@ jobs:!/apps/mobile/modules/t3-terminal/Vendor/**/*.asparse-checkout-cone-mode: false- # A full install: a filtered one that misses the cache first saves its- # partial store under the shared lockfile key for every later job.- name: Setup Vite+uses: ./.github/actions/setup-ci-depsdiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 44b52d1a616..d0e60fdfc75 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -129,12 +129,8 @@ jobs:!/.repos/sparse-checkout-cone-mode: false- - name: Setup Vite+- uses: voidzero-dev/setup-vp@v1- with:- node-version-file: package.json- cache: true- run-install: true+ - name: Setup dependencies+ uses: ./.github/actions/setup-ci-depsenv:pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata@@ -247,12 +243,8 @@ jobs:!/.repos/sparse-checkout-cone-mode: false- - name: Setup Vite+- uses: voidzero-dev/setup-vp@v1- with:- node-version-file: package.json- cache: true- run-install: true+ - name: Setup dependencies+ uses: ./.github/actions/setup-ci-deps- name: Ensure Electron runtime is installedrun: vp run --filter @t3tools/desktop ensure:electron@@ -281,12 +273,8 @@ jobs:!/.repos/sparse-checkout-cone-mode: false- - name: Setup Vite+- uses: voidzero-dev/setup-vp@v1- with:- node-version-file: package.json- cache: true- run-install: true+ - name: Setup dependencies+ uses: ./.github/actions/setup-ci-deps- name: Ensure Electron runtime is installedrun: vp run --filter @t3tools/desktop ensure:electron@@ -325,12 +313,8 @@ jobs:!/.repos/sparse-checkout-cone-mode: false- - name: Setup Vite+- uses: voidzero-dev/setup-vp@v1- with:- node-version-file: package.json- cache: true- run-install: true+ - name: Setup dependencies+ uses: ./.github/actions/setup-ci-deps# No Electron setup here: `t3` (apps/server) has no Electron dependency# and none of its tests touch the runtime. Only the non-server `test`