Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coveralls not working with Travis

I'am building an app in Java with gradle as build tool. I use Travis CI and wanted to get the code coverage with Coveralls.

But when grade builds my project, I get the following output:

HTTP/1.1 422 Unprocessable Entity

[Server: cloudflare-nginx, Date: Thu, 13 Nov 2014 14:31:33 GMT, Content-Type: application/json; charset=utf-8, Transfer-Encoding: chunked, Connection: keep-alive, Set-Cookie: __cfduid=d46e83ad1141ffa7f92b62a3064e1bdc11415889091; expires=Fri, 13-Nov-15 14:31:31 GMT; path=/; domain=.coveralls.io; HttpOnly, Status: 422 Unprocessable Entity, X-UA-Compatible: IE=Edge,chrome=1, Cache-Control: no-cache, Set-Cookie: request_method=POST; path=/, X-Request-Id: 0f27c4be254c74919ad8a0365f9ca6f6, X-Runtime: 0.830221, X-Rack-Cache: invalidate, pass, X-Powered-By: Phusion Passenger 4.0.47, Set-Cookie: LSW_WEB="LSW_WEB2"; path=/, CF-RAY: 188bac68b44e0874-IAD]

[error:true, message:Couldn't find a repository matching this job.]

I'm using cobertura for the code coverage.

Thank's

like image 824
Lukas92 Avatar asked Nov 13 '14 14:11

Lukas92


1 Answers

To use Coveralls with Gradle and Travis, I'm using the Coverall's Gradle plugin (com.github.kt3k.coveralls) and a command after success in Travis.

The plugin's readme explains its usage pretty well. But if you want to check an example, you can refer to the project in which I'm using it: Sabina Java

The relevant files are: .travis.yml and build.gradle

Just a hint: you can enable logging in Travis adding the --info flag in the commands to help you spot the bugs.

I hope this would be of any use after such a long time.

like image 67
jaguililla Avatar answered Sep 29 '22 16:09

jaguililla