You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add your repository to Coveralls.
打开https://coveralls.io/,使用GitHub账号登录,将你需要测试的代码项目开关打开。
Configure your build to install the Coveralls library for the programming language you’re using.
Coveralls与Travis是自动集成的,修改Travis的.travis.yml文件,最后加上这一行:
徽章就是如上图的东西,每个徽章通过色彩和数字简要的说明了项目的某种特征,更加直观的多维度了解这个项目。
Travis CI徽章
Travis CI是一个持续集成平台,通过CI我们可以第一时间知道我们的项目有没有打包成功,获得徽章,我们参照官网的指南就可以了。
接下来我们就可以在travis-ci上获得这个徽章,我们可以选择Markdown语法,然后写到项目的Readme里。
Sonar 徽章
打开https://sonarcloud.io/,同样使用GitHub登录,按照说明我们获取到token,然后在Github项目根目录下执行命令:
执行好后,在sonarcloud上的项目目录下,就可以领取徽章了。
Coveralls
对于普通的Java项目,需要两步:
Add your repository to Coveralls.
打开https://coveralls.io/,使用GitHub账号登录,将你需要测试的代码项目开关打开。
Configure your build to install the Coveralls library for the programming language you’re using.
Coveralls与Travis是自动集成的,修改Travis的
.travis.yml
文件,最后加上这一行:同时在项目的POM.xml文件里面,引入响应的插件:
至此,当触发CI的时候,就会上传覆盖率的报告,我们可以去coveralls领徽章了。
更多徽章
我们可以去gitter领社交徽章、也可以接着去领取license徽章,等等。
但是程序员的世界你不懂,当我们不断的领徽章的时候,有一部分程序员提供了徽章服务,你完全可以自定义自己的徽章。打开下面这个链接,你将看到一个GoodGame徽章:
服务是由https://shields.io/提供。
The text was updated successfully, but these errors were encountered: