Travis CI testing branches with corresponding set of environment variables
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a project that I'm trying to automate tests using Travis CI. I have a dev branch and a test branch, and they have different environment variables. For example, on the dev branch, I need to connect to a different API than the test branch, specified by an environment variable. So, when I run the build on the dev branch on Travis, how do I set it up so that it only tests with the dev set of environment variables, and likewise for build on test branch? 回答1: There is no great way to do this right now, but you can write a shell script that