将 Cypress 测试集成到 Azure Devops 拉取请求中
Integrate Cypress tests into Azure Devops Pull Request
我一直在阅读 Azure Devops 文档,我完全被它们弄糊涂了。我想要的只是一些非常简单的东西(反正 Github 中的 Github 操作很简单),其中
- 一位开发者创建了一个 PR。
- 创建 PR 后,Azure 会运行所有相关的 Cypress 测试
- 如果有任何失败,那么 PR 顶部的注释会指出这一点。例如,就在 'there are merge conflicts'
旁边
我们曾在 Github 中使用过此功能,但我无法在此处弄清楚。
谢谢
azure devops中没有像“Cypress GitHub app”这样的扩展,所以不可能实现和github pull request中完全一样的功能。
作为解决方法,您可以尝试添加 status policy.
Using status alone, details from an external service can be provided
to users within the PR experience. Sometimes, sharing information
about a PR is all that is necessary, but in other cases PRs should be
blocked from merging until requirements are met. Like the in-box
policies, the Status policy provides a way for external services to
block PR completion until requirements are met. If the policy is
required, it must pass in order to complete the pull request. If the
policy is optional, it is informational only, and a status of
succeeded
is not required in order to complete the pull request.
外部服务可以使用 PR Status API to post detailed status to your PRs. The branch policy for external services brings the ability for those 3rd party services to participate in the PR workflow and establish policy requirements. This article 指导您完成为发布 PR 状态的服务配置分支策略的过程。
另外,这里有一篇关于如何创建required pull request status check,大家可以参考一下。
我一直在阅读 Azure Devops 文档,我完全被它们弄糊涂了。我想要的只是一些非常简单的东西(反正 Github 中的 Github 操作很简单),其中
- 一位开发者创建了一个 PR。
- 创建 PR 后,Azure 会运行所有相关的 Cypress 测试
- 如果有任何失败,那么 PR 顶部的注释会指出这一点。例如,就在 'there are merge conflicts' 旁边
我们曾在 Github 中使用过此功能,但我无法在此处弄清楚。
谢谢
azure devops中没有像“Cypress GitHub app”这样的扩展,所以不可能实现和github pull request中完全一样的功能。
作为解决方法,您可以尝试添加 status policy.
Using status alone, details from an external service can be provided to users within the PR experience. Sometimes, sharing information about a PR is all that is necessary, but in other cases PRs should be blocked from merging until requirements are met. Like the in-box policies, the Status policy provides a way for external services to block PR completion until requirements are met. If the policy is required, it must pass in order to complete the pull request. If the policy is optional, it is informational only, and a status of
succeeded
is not required in order to complete the pull request.
外部服务可以使用 PR Status API to post detailed status to your PRs. The branch policy for external services brings the ability for those 3rd party services to participate in the PR workflow and establish policy requirements. This article 指导您完成为发布 PR 状态的服务配置分支策略的过程。
另外,这里有一篇