Travis CI 为每个 Github 提交推送创建两个构建

Travis CI creates two builds for each Github commit push

每次我推送到 Github,它似乎触发 两个 Travis CI 构建 - 一个用于 PR,一个用于推送本身。从链接来看,它们似乎也是独立的构建。

两者之间的确切区别是什么?如何启用它以便只运行一个?

您的场景中发生的情况如下所示:

continuous-integration/travis-ci/push - 仅 运行 分支测试

continuous-integration/travis-ci/pr - 合并和 运行 测试

这完全没问题 - 但如果您想摆脱其中一个构建,您需要在 Travis 的项目设置中禁用 Build pushesBuild pull requests


来源:

https://github.com/travis-ci/travis-ci/issues/1504

https://github.com/twisted/twistedchecker/pull/93

https://blog.travis-ci.com/2014-03-05-repository-settings/

您可以在存储库的 TravisCI 设置中取消选中构建推送或 PR:

它们的区别是:

  • /pr 构建自动合并状态(就好像您合并了 PR 和 运行 测试,注意:如果 PR 不能自动合并,它不会 运行 ).
  • /push 为你推送到的 b运行ch 的当前状态构建(就好像你 运行 你刚刚推送的本地副本上的测试),