Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual code coverage in travis-ci

I've got some github projects which I want to test with code coverage. The only way I found (see blog post) to achieve this is to write a custom script that counts code coverage XML lines and outputs Code coverage is 74.32%, which is below the accepted 80%. Displaying code coverage in HTML is way better, but is it possible in travis-ci?

like image 547
ducin Avatar asked Feb 22 '13 15:02

ducin


People also ask

Which of the following analysis tool is used for code coverage in Travis CI?

Coveralls is a hosted analysis tool, providing statistics about your code coverage. Configuring your Travis CI build to send results to Coveralls always follows the same pattern: Add your repository to Coveralls.

Is Travis CI a CI tool?

Like Jenkins, Travis CI is also one of the early players in the CI/CD tools market. The tool is written in Ruby and is developed & maintained by the Travis CI community. Travis CI was earlier available only for GitHub hosted projects but now it also supports Bitbucket hosted projects.

What is Codecov used for?

Codecov provides metrics and insights into the results of tests through code coverage reports. Coverage reports are used to determine which lines of code were tested and which lines were not tested, which may contain bugs and syntax errors.

How do I set up coveralls?

Setting up CoverallsGo to https://coveralls.io/ and click SIGN IN . Then click GITHUB SIGN IN and enter your GitHub account details if needed. After logging in, you will be brought to the Your Repositories page. On the site's navigation bar, click ADD REPOS.


1 Answers

You can use https://coveralls.io/ together with Travis to display coverage nicely. Example can be found here: https://coveralls.io/r/phpmyadmin/error-reporting-server

PS: I know this is quite old question, but I've found it just now when searching for something else.

like image 163
Michal Čihař Avatar answered Jan 02 '23 21:01

Michal Čihař