docs: add e2e test workflow and prod smoke test to CLAUDE.md
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,19 @@
|
||||
|
||||
---
|
||||
|
||||
## E2E 测试流程(新功能开发标准流程)
|
||||
|
||||
为节约 CI 资源、加快迭代速度,新功能开发采用 **先本地验证,再推送 CI** 的流程:
|
||||
|
||||
1. **本地开发 & 编译** — `cargo check` 确保无编译错误
|
||||
2. **部署测试服 (moicen)** — `git push` → SSH 登录 moicen → `git pull` → `cargo build --release`
|
||||
3. **本地发起 e2e 测试** — 在本地运行 e2e 测试套件,请求指向 moicen 测试服
|
||||
4. **验证通过后推送 CI** — `git push origin master` → GitHub Actions 自动运行 `cargo check` + 全量 e2e
|
||||
5. **部署正式服 (alchemy)** — SSH 登录 alchemy → `git pull` → `cargo build --release` → 重启服务
|
||||
6. **正式服 CI smoke test** — 部署后立即触发 GitHub Actions 的 prod smoke test workflow,验证正式服 API 响应正常。若 smoke test 失败,立即回滚并排查
|
||||
|
||||
**Why:** 大部分问题在步骤 2-3 就能发现,避免反复触发 CI 浪费排队时间和 GitHub Actions 配额。
|
||||
|
||||
## 部署原则
|
||||
|
||||
**禁止使用 scp/rsync 部署代码。** 所有部署必须走 GitHub push → 服务器 git pull 的流程。
|
||||
|
||||
Reference in New Issue
Block a user