Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
改进GitHub上的项目工作流_Git_Github_Travis Ci - Fatal编程技术网

改进GitHub上的项目工作流

改进GitHub上的项目工作流,git,github,travis-ci,Git,Github,Travis Ci,我目前正在从事一个开源云项目。该项目的存储库位于GitHub上,不在我的控制范围内。 我有自己的分叉存储库,并在其上集成了Travis CI,以自动构建代码并运行测试用例。您需要许多文件,例如.travis.yml文件,您需要将其推送到GitHub上以触发travis。我使用一个Rakefile来运行我的单元测试 问题是,项目的主存储库不在我的控制之下,存储库的所有者不希望使用它配置Travis CI。因此,如果我生成一个pull请求,我需要确保没有任何测试文件(例如travis.yml或Rak

我目前正在从事一个开源云项目。该项目的存储库位于GitHub上,不在我的控制范围内。 我有自己的分叉存储库,并在其上集成了Travis CI,以自动构建代码并运行测试用例。您需要许多文件,例如.travis.yml文件,您需要将其推送到GitHub上以触发travis。我使用一个Rakefile来运行我的单元测试

问题是,项目的主存储库不在我的控制之下,存储库的所有者不希望使用它配置Travis CI。因此,如果我生成一个pull请求,我需要确保没有任何测试文件(例如travis.yml或Rakefile)在pull请求中执行。当然,我可以删除这些文件,但它们仍然会出现在提交历史记录中,这正是我试图避免的。我不希望Travis CI的任何跟踪在生成pull请求时到达主存储库

为了实现这一点,商定了以下工作流程:

 1. Fork project repository in your own GitHub account.
 2. Clone it in your local computer. Set up the main repository as your upstream 
    repository.
 3. Create a testing branch from the master branch and push it on origin (your account).
 4. Before you start working on a new feature, pull the latest code from the upstream 
    repository into both the master as well as the testing branch.
 5. Add the .travis.yml and other test files that you need to activate Travis CI in the 
    testing branch and once again push to origin.
 6. Create a feature branch from the master branch. 
 7. Do all your work on the feature branch. Write code, run tests.
 8. When feature is ready, take the latest code pull from the upstream repo. 
    Resolve any merge conflicts that happen.
 9. Generate Peer Reviews.
10. [Peer Reviews Passed] Merge feature branch into the testing branch.
11. Push the testing branch on origin. This will activate Travis CI
12. [Travis Passed] Generate Pull Request. Your work is done.
13. [Travis Failed] Travis CI has failed your tests. Repeat Step 7.
要将其可视化,请查看下图

=>

我的问题是,有什么能帮助我改进这个工作流程吗?正如您所看到的,每次将代码合并到测试分支以触发Travis CI都会带来很大的开销