Skip to content

Commit f0de5cb

Browse files
committed
ci: 修正 turbo 2.x 的 Actions 缓存路径(node_modules/.cache/turbo → .turbo/cache)
六处缓存步骤仍指向 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U8Ms7unkKxTrmNCX2r1dfs
1 parent 850033c commit f0de5cb

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/changeset-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Turbo Cache
4747
uses: actions/cache@v6
4848
with:
49-
path: node_modules/.cache/turbo
49+
path: .turbo/cache
5050
key: turbo-${{ runner.os }}-${{ github.sha }}
5151
restore-keys: |
5252
turbo-${{ runner.os }}-

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
- name: Turbo Cache
8787
uses: actions/cache@v6
8888
with:
89-
path: node_modules/.cache/turbo
89+
path: .turbo/cache
9090
key: turbo-${{ runner.os }}-type-check-${{ github.sha }}
9191
restore-keys: |
9292
turbo-${{ runner.os }}-type-check-
@@ -324,7 +324,7 @@ jobs:
324324
if: steps.docs-changes.outputs.should_run == 'true'
325325
uses: actions/cache@v6
326326
with:
327-
path: node_modules/.cache/turbo
327+
path: .turbo/cache
328328
key: turbo-${{ runner.os }}-docs-${{ github.sha }}
329329
restore-keys: |
330330
turbo-${{ runner.os }}-docs-

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
- name: Turbo Cache
6767
uses: actions/cache@v6
6868
with:
69-
path: node_modules/.cache/turbo
69+
path: .turbo/cache
7070
key: turbo-${{ runner.os }}-${{ github.sha }}
7171
restore-keys: |
7272
turbo-${{ runner.os }}-

.github/workflows/performance-budget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Turbo Cache
4848
uses: actions/cache@v6
4949
with:
50-
path: node_modules/.cache/turbo
50+
path: .turbo/cache
5151
key: turbo-${{ runner.os }}-${{ github.sha }}
5252
restore-keys: |
5353
turbo-${{ runner.os }}-

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Turbo Cache
3737
uses: actions/cache@v6
3838
with:
39-
path: node_modules/.cache/turbo
39+
path: .turbo/cache
4040
key: turbo-${{ runner.os }}-${{ github.sha }}
4141
restore-keys: |
4242
turbo-${{ runner.os }}-

0 commit comments

Comments
 (0)