refactor: e2e-check workflow 拆分为 4 角色 #64

Merged
xiaomo merged 1 commits from fix/e2e-check-role-split into main 2026-05-31 10:58:50 +00:00
Owner

What

将 e2e-check workflow 从 2 角色(tester + reporter)拆分为 4 角色。

Why

  • preparer 和 cleanup 是环境管理,与测试逻辑无关,独立出来职责更清晰
  • tester 只专注跑测试场景,不用管 Docker 生命周期
  • cleanup 确保无论成功/失败都清理容器(reporter 完成后也走 cleanup)

Changes

e2e-check.yaml — 4 角色拆分:

角色 职责
preparer Docker 起容器、copy/install/build/lint/test/init store
tester 纯 CLI 场景测试(接收 containerName + storePath)
reporter 开 Gitea issue(setup_failed 或 bugs_found 触发)
cleanup 停容器、rm 容器(所有路径最终汇入)

流程图:

$START → preparer → tester → cleanup → $END
                ↘            ↗
              reporter → cleanup

其他修复:

  • template 变量 {{ name }}{{ payload.name }}(by design)
  • tester frontmatter 传递 containerName 便于 cleanup 引用

Ref

主人建议将 prepare/cleanup 独立出来

## What 将 e2e-check workflow 从 2 角色(tester + reporter)拆分为 4 角色。 ## Why - preparer 和 cleanup 是环境管理,与测试逻辑无关,独立出来职责更清晰 - tester 只专注跑测试场景,不用管 Docker 生命周期 - cleanup 确保无论成功/失败都清理容器(reporter 完成后也走 cleanup) ## Changes `e2e-check.yaml` — 4 角色拆分: | 角色 | 职责 | |------|------| | preparer | Docker 起容器、copy/install/build/lint/test/init store | | tester | 纯 CLI 场景测试(接收 containerName + storePath) | | reporter | 开 Gitea issue(setup_failed 或 bugs_found 触发) | | cleanup | 停容器、rm 容器(所有路径最终汇入) | 流程图: ``` $START → preparer → tester → cleanup → $END ↘ ↗ reporter → cleanup ``` 其他修复: - template 变量 `{{ name }}` → `{{ payload.name }}`(by design) - tester frontmatter 传递 containerName 便于 cleanup 引用 ## Ref 主人建议将 prepare/cleanup 独立出来
xingyue added 1 commit 2026-05-31 10:23:58 +00:00
- preparer: Docker setup, install, build, lint, unit test, init store
- tester: pure CLI scenario testing (receives container + store path)
- reporter: file Gitea issues (triggered by bugs or setup failures)
- cleanup: stop and remove Docker container

Also fixes template variable prefix (payload.name vs name).
xiaomo approved these changes 2026-05-31 10:58:49 +00:00
xiaomo left a comment
Owner

LGTM 拆分清晰:preparer → tester → reporter → cleanup,职责单一。模板变量也修正为 payload. 前缀。

LGTM ✅ 拆分清晰:preparer → tester → reporter → cleanup,职责单一。模板变量也修正为 payload. 前缀。
xiaomo merged commit de20cfde53 into main 2026-05-31 10:58:50 +00:00
xiaomo deleted branch fix/e2e-check-role-split 2026-05-31 10:58:50 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/json-cas#64