[libvirt] [PATCH 1/1] CI: add code coverage analysis

Claudio André claudioandre.br at gmail.com
Thu May 25 23:44:48 UTC 2017

Em 25/05/2017 03:49, Martin Kletzander escreveu:
> On Thu, May 25, 2017 at 01:14:36AM -0300, claudioandre.br at gmail.com 
> wrote:
>> From: Claudio André <claudioandre.br at gmail.com>
>> It builds the code coverage report and uploads the coverage data to a 
>> web service in order to allow to track libvirt's code coverage over 
>> time.
>> ---
> You can add the links from the cover letter right here.  It is below the
> '---' marker, so it won't be part of the commit message, but it is also
> before the first 'diff --git', so it won't be considered part of the
> patch either.  Just like the stats below.

Thanks for the information

>> +after_success:
>> +  - 'if [ -n "${COVERAGE}" ]; then
>> +        make -j3 cov;
>> +        coveralls-lcov --repo-token ${COVERALLS_TOKEN} 
>> coverage/libvirt.info;
> I like this, but I have no idea where COVERALLS_TOKEN comes from.

The Token comes from coveralls.io site.
1. create your/libvirt account on coveralls (using GitHub credentials)
2. enable the libvirt repository and you will be able to see a field 
named: REPO TOKEN.
3. then, using Travis website (or Travis CLI tool, I prefer the first 
for this case) you save the token ciphered.

For Coveralls, click here and there and you will find your way to enable 
the repository and get the token (probably 
For Travis: https://travis-ci.org/YOUR_NICK/libvirt/settings, you'll see 
"Environment Variables" and the add button.

>  How do we make sure that no user branches will post stuff to the
> coveralls.io site?

Because Travis save the token ciphered, nobody else can see the token. 
In fact, if you save it using the site, it does not exist even in the 
.travis.yml file.
And if Travis, Coveralls, ..., are compromised, you can easily 
regenerate the Token fast enough to avoid damage.

Sorry if the message sounds, umm, pedantic.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170525/de5a91c8/attachment-0001.htm>

More information about the libvir-list mailing list