travis-ci 如何回复 github 测试已通过?
How does travis-ci reply back to github that tests are passed?
我试图了解 travis-ci 的工作原理,首先我授权该应用程序为拉取请求、推送等创建 webhooks.. 然后只要有拉取请求,travis 就会收到通知。但它如何回复 github 测试已通过?
八音八,
Travis 回复 GitHub 说测试是通过 webhook 传递的,类似于在拉取请求或推送时创建通知的 webhook made.For Travis CI 知道什么要构建,您必须将 .travis.yml 文件添加到 repository.The 文件中,该文件将包含您正在使用的语言、gem 版本和/或您拥有的依赖项。 Travis CI 根据您正在使用的语言版本测试您的项目,并且在每次提交或推送后触发 Travis CI 构建,这会导致测试通过或失败。
** 我从 Travis CI
收集了大部分回复
作为官方GitHub's guide on building CI servers tells us in the Working with statuses section, one changes the build status by calling the create_status
function on the client handle obtained via the Octocat.rbgem像这样:
def process_pull_request(pull_request)
@client.create_status(pull_request['base']['repo']['full_name'], pull_request['head']['sha'], 'pending')
sleep 2 # do busy work...
@client.create_status(pull_request['base']['repo']['full_name'], pull_request['head']['sha'], 'success')
puts "Pull request processed!"
end
其中 process_pull_request()
是一个接收 JSON 有效负载的函数 PUSH
由 GitHub 自身编辑。
有一个 API documentation section 专门用于直接通过 API 创建状态。
我试图了解 travis-ci 的工作原理,首先我授权该应用程序为拉取请求、推送等创建 webhooks.. 然后只要有拉取请求,travis 就会收到通知。但它如何回复 github 测试已通过?
八音八,
Travis 回复 GitHub 说测试是通过 webhook 传递的,类似于在拉取请求或推送时创建通知的 webhook made.For Travis CI 知道什么要构建,您必须将 .travis.yml 文件添加到 repository.The 文件中,该文件将包含您正在使用的语言、gem 版本和/或您拥有的依赖项。 Travis CI 根据您正在使用的语言版本测试您的项目,并且在每次提交或推送后触发 Travis CI 构建,这会导致测试通过或失败。
** 我从 Travis CI
收集了大部分回复作为官方GitHub's guide on building CI servers tells us in the Working with statuses section, one changes the build status by calling the create_status
function on the client handle obtained via the Octocat.rbgem像这样:
def process_pull_request(pull_request)
@client.create_status(pull_request['base']['repo']['full_name'], pull_request['head']['sha'], 'pending')
sleep 2 # do busy work...
@client.create_status(pull_request['base']['repo']['full_name'], pull_request['head']['sha'], 'success')
puts "Pull request processed!"
end
其中 process_pull_request()
是一个接收 JSON 有效负载的函数 PUSH
由 GitHub 自身编辑。
有一个 API documentation section 专门用于直接通过 API 创建状态。