This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
【Contributor 文档】弹性运维调度系统 module-controller 单元测试和集成测试流程 #2
Comments
lylingzhen
changed the title
建设 SOFAServerless CI 环境
建设 SOFAServerless 从运维调度到客户端端到端 CI 环境
Jul 27, 2023
Closed
在 #26 中跟进。 |
lylingzhen
changed the title
弹性运维调度 module-controller 系统 CI 流程
【Contributor 文档】弹性运维调度 module-controller 系统单元测试和集成测试 CI 流程
Aug 28, 2023
lylingzhen
changed the title
【Contributor 文档】弹性运维调度 module-controller 系统单元测试和集成测试 CI 流程
【Contributor 文档】弹性运维调度 module-controller 系统单元测试和集成测试流程
Aug 28, 2023
lylingzhen
changed the title
【Contributor 文档】弹性运维调度 module-controller 系统单元测试和集成测试流程
【Contributor 文档】弹性运维调度系统 module-controller 单元测试和集成测试
Aug 28, 2023
lylingzhen
changed the title
【Contributor 文档】弹性运维调度系统 module-controller 单元测试和集成测试
【Contributor 文档】弹性运维调度系统 module-controller 单元测试和集成测试流程
Aug 28, 2023
@gold300jin 关注。 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
注:当前流水线只支持 module-controller master 分支,若需要跑其它分支可在社区协作钉钉群(群号:24970018417)讨论并提交 PR。
单元测试
自动执行
任意 Contributor 修改 module-controller 代码并发起 PR 到 master 分支或者在 master 分支 PR 合并之后,单元测试的 Workflow 会被自动执行,您可在 PR 的流水线中看到单元测试的执行结果,单测 Workflow 执行通过才允许合并。比如:https://github.com/sofastack/sofa-serverless/pull/50/checks
您也可前往 GitHub Workflow 直接查看执行结果:https://github.com/sofastack/sofa-serverless/actions/workflows/module_controller_unit_test.yml
手动执行
进入 GitHub Workflow:https://github.com/sofastack/sofa-serverless/actions/workflows/module_controller_unit_test.yml
点击右上角 "Run workflow" -> "Run workflow":
如何修改 Workflow
Workflow 定义文件:https://github.com/sofastack/sofa-serverless/blob/master/.github/workflows/module_controller_unit_test.yml ,可按需修改并提交 PR。
注:当前尚未开启 go build 增量构建,欢迎大家指教如何配置开启。
集成测试
流水线位置
https://github.com/sofastack/sofa-serverless/blob/master/.github/workflows/module_controller_build_deploy_to_aliyun.yml
流水线触发时机
module-contorller/ 目录里的代码 PR 完成到 master 分支的合并之后,会触发该流水线执行。每次正式 Release 版本前,必须保证集成测试流水线成功执行。
集成测试原理
有输入和建议欢迎补充。
集成测试用例写在 module-controller/integration-tests 里。module-controller/IntegrationTestDockerfile 是用来构建集成测试应用的 Dockerfile,构建出的集成测试应用是一次性 Job,集成测试用例跑完后销毁。
每一个集成测试用例都会发起一条运维链路(比如正常的模块发布链路;带 Beta 和分组确认的模块发布链路等等),并对中间件结果进行详细 Assert 验证和日志输出,在所有集成测试跑完后,集成测试应用结束。
module-controller/IntegrationTestDockerfile 是集成测试构建运行的 Dockerfile。
流水线步骤
The text was updated successfully, but these errors were encountered: