【问题标题】:Travis CI creates two builds for each Github commit pushTravis CI 为每个 Github 提交推送创建两个构建
【发布时间】:2016-04-30 17:15:25
【问题描述】:

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

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

【问题讨论】:

    标签: ruby-on-rails github travis-ci


    【解决方案1】:

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

    它们的区别是:

    • /pr 构建自动合并状态(就像您合并 PR 并在其上运行测试,注意:如果 PR 不能自动合并,它将不会运行)。
    • /push 为您推送到的分支的当前状态构建(就像您在刚刚推送的本地副本上运行测试一样),

    【讨论】:

    【解决方案2】:

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

    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/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-07
      • 2013-07-10
      • 1970-01-01
      • 1970-01-01
      • 2021-06-19
      相关资源
      最近更新 更多