Skip to content

Conversation

@Gaubee
Copy link
Contributor

@Gaubee Gaubee commented Dec 19, 2025

优化内容

1. 并行化任务

typecheck ──┐
test ───────┼──> checks (final)
build ──────┤
e2e ────────┘

2. 缓存 Playwright 浏览器

  • 使用 actions/cache 缓存 ~/.cache/ms-playwright
  • 首次运行下载,后续使用缓存
  • 预计节省 ~60s

3. 智能跳过 E2E

  • 使用 dorny/paths-filter 检测变更类型
  • 仅文档变更 (docs/**, *.md) 时跳过 E2E
  • 代码变更时正常运行 E2E

预期效果

场景 优化前 优化后
代码变更 ~3 分钟 ~1.5 分钟
文档变更 ~3 分钟 ~1 分钟

测试

这个 PR 本身会触发新的 CI 流程,可以验证优化效果。

- 并行化任务: typecheck, test, build, e2e 同时运行
- 缓存 Playwright: 避免每次下载浏览器
- 智能跳过 E2E: 仅文档变更时跳过 E2E 测试
- 变更检测: 使用 dorny/paths-filter 检测变更类型

预期效果:
- 代码变更: ~1.5 分钟 (并行 + 缓存)
- 文档变更: ~1 分钟 (跳过 E2E)
@Gaubee Gaubee merged commit d3ff274 into main Dec 19, 2025
6 checks passed
@Gaubee Gaubee deleted the ci/optimize-workflow branch December 19, 2025 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants