我在github上有一个项目,它有大量的单元测试(使用mocha作为node.js) .
我想通过在每个页面上显示通过/失败的测试来炫耀 . 我注意到Github上的其他项目正在这样做 .
我一直无法找到有关如何显示测试状态的任何文档 .
如何让Github显示单元测试输出?
Github是否运行测试或者您是否需要连接外部Web应用程序?
是否有免费的网络服务(我的应用程序是开源)?
请注意,自2013年4月26日起,您可以在GitHub repo branch page上看到build status:
Commit Status API允许您在其他地方使用它:请参阅“Repo Statuses API” .
从2013年4月30日开始,API endpoint for commit statuses已扩展为允许分支 and tag names, as well as commit SHAs .
看看Travis CI . 您可以将它与GitHub一起使用 .
他们有docs on using NodeJS
您看到的那些徽章在项目的README.md文件中称为"status images" and Travis provides MarkDown that you can insert .
CircleCI the status badges也只是您可以使用降价功能放入 README.md 文件的图像 . 例如:
README.md
![Build Status](https://circleci.com/gh/<your github name>/<repo name>.png?circle-token=:circle-token)
要么
![Build Status](https://circleci.com/gh/<your github name>/<repo name>.svg?style=shield&circle-token=:circle-token)
是的我很确定你的意思是Jenkins或者https://travis-ci.org/他们在你的github帐户上工作!在每次提交时都会执行测试 .
4 回答
请注意,自2013年4月26日起,您可以在GitHub repo branch page上看到build status:
Commit Status API允许您在其他地方使用它:请参阅“Repo Statuses API” .
从2013年4月30日开始,API endpoint for commit statuses已扩展为允许分支 and tag names, as well as commit SHAs .
看看Travis CI . 您可以将它与GitHub一起使用 .
他们有docs on using NodeJS
您看到的那些徽章在项目的README.md文件中称为"status images" and Travis provides MarkDown that you can insert .
CircleCI the status badges也只是您可以使用降价功能放入
README.md
文件的图像 . 例如:要么
是的我很确定你的意思是Jenkins或者https://travis-ci.org/他们在你的github帐户上工作!在每次提交时都会执行测试 .