gpt4 book ai didi

github - Travis 推送失败但通过 PR

转载 作者:行者123 更新时间:2023-12-04 02:04:31 24 4
gpt4 key购买 nike

Travis 的构建如何可能因最新推送而失败但通过了拉取请求?



On this Gist ,你可以找到npm run build的失败和通过的输出日志特拉维斯给出的命令。您还可以在下面找到 Travis 的配置:

install:
- npm install
- npm install -g angular-cli
language: node_js
script:
- gulp html
- gulp scss
- gulp ts
- gulp node
- npm run build
node_js:
- "6.9"
cache:
directories:
- node_modules
- bower_components

最佳答案

背景

这个存储库在 Travis CI 中配置为在两个环境上运行测试 - 命名为 prpush .

一个 拉取请求 (pr) 构建将命名为 continuous-integration/travis-ci/pr来自 the docs :

Rather than test the commits that have been pushed to the branch the pull request is from, we test the merge between the origin and the upstream branch. To only build on push events, you can disable Build on Pull Requests from your repository settings.



一个 构建将命名为 continuous-integration/travis-ci/push来自 the docs

Travis only runs a build on the commits you push AFTER adding the repository to Travis.



解决方案

由于您的分支合并到基础分支通过了 continuous-integration/travis-ci/push 的测试,更新您的分支以包含来自基础分支的最新提交将使您的分支通过测试。从上图中,GitHub UI 应该允许您 更新分支 从拉取请求页面。

警告

有了分支保护,你的分支不太可能在合并到基础分支成功的情况下测试失败。

确保您确认损坏的任何内容实际上都已修复。也就是说,是否有人通过禁用基础分支中的失败测试来“修复构建”?作为一个谨慎的人,我会在您的分支中挑选修复程序以验证问题是否已解决。

关于github - Travis 推送失败但通过 PR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41524861/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com