Coveralls not working with Travis

1.7k views Asked by At

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

2

There are 2 answers

0
jaguililla On

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.

0
barfuin On

I also got this error (Couldn't find a repository matching this job.) when I specified a repo token. The Coveralls documentation suggested to specify a repo token, but didn't make it clear enough to me that you must not specify a repo token if you're using public repos.

In other words, if your stuff is public on GitHub and on Coveralls, don't specify a repo token, or you'll get this error.