From f0de5cb66664474c7959e4b3ef69d2a3f0e60a79 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 1 Aug 2026 13:37:28 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20=E4=BF=AE=E6=AD=A3=20turbo=202.x=20?= =?UTF-8?q?=E7=9A=84=20Actions=20=E7=BC=93=E5=AD=98=E8=B7=AF=E5=BE=84(node?= =?UTF-8?q?=5Fmodules/.cache/turbo=20=E2=86=92=20.turbo/cache)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 六处缓存步骤仍指向 turbo 1.x 的缓存目录 node_modules/.cache/turbo,而仓库 用的是 turbo ^2.10.7,实际写入 .turbo/cache(已实测确认)——即每次恢复和 保存的都是不存在的目录,Turbo 缓存形同虚设。Type Check job 因此每个 PR 都 在冷缓存下全量重建 ^build 依赖再全量检查(实测 5m26s,是 CI 关键路径)。 修正后未变更包命中缓存,预计该 job 降至 1-2 分钟。 涉及 ci.yml(type-check、docs)、lint.yml、release.yml、 changeset-release.yml、performance-budget.yml。 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01U8Ms7unkKxTrmNCX2r1dfs --- .github/workflows/changeset-release.yml | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/performance-budget.yml | 2 +- .github/workflows/release.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/changeset-release.yml b/.github/workflows/changeset-release.yml index 1eb839c89..148eb73fe 100644 --- a/.github/workflows/changeset-release.yml +++ b/.github/workflows/changeset-release.yml @@ -46,7 +46,7 @@ jobs: - name: Turbo Cache uses: actions/cache@v6 with: - path: node_modules/.cache/turbo + path: .turbo/cache key: turbo-${{ runner.os }}-${{ github.sha }} restore-keys: | turbo-${{ runner.os }}- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af9ca5b16..7cb4bd685 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: - name: Turbo Cache uses: actions/cache@v6 with: - path: node_modules/.cache/turbo + path: .turbo/cache key: turbo-${{ runner.os }}-type-check-${{ github.sha }} restore-keys: | turbo-${{ runner.os }}-type-check- @@ -324,7 +324,7 @@ jobs: if: steps.docs-changes.outputs.should_run == 'true' uses: actions/cache@v6 with: - path: node_modules/.cache/turbo + path: .turbo/cache key: turbo-${{ runner.os }}-docs-${{ github.sha }} restore-keys: | turbo-${{ runner.os }}-docs- diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ff3d6746c..dbac5296e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -66,7 +66,7 @@ jobs: - name: Turbo Cache uses: actions/cache@v6 with: - path: node_modules/.cache/turbo + path: .turbo/cache key: turbo-${{ runner.os }}-${{ github.sha }} restore-keys: | turbo-${{ runner.os }}- diff --git a/.github/workflows/performance-budget.yml b/.github/workflows/performance-budget.yml index 5cc25eab7..97914f9cb 100644 --- a/.github/workflows/performance-budget.yml +++ b/.github/workflows/performance-budget.yml @@ -47,7 +47,7 @@ jobs: - name: Turbo Cache uses: actions/cache@v6 with: - path: node_modules/.cache/turbo + path: .turbo/cache key: turbo-${{ runner.os }}-${{ github.sha }} restore-keys: | turbo-${{ runner.os }}- diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59d48e3ed..28387517d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: - name: Turbo Cache uses: actions/cache@v6 with: - path: node_modules/.cache/turbo + path: .turbo/cache key: turbo-${{ runner.os }}-${{ github.sha }} restore-keys: | turbo-${{ runner.os }}-