Coveralls in a monorepo

A short rant


One of my recent tasks at work was to implement a workflow to upload coverage reports to Coveralls after each test run in CI. I expected it to be an easy task since we already have our CI set up to run all the tests. Now it’s just a matter of generating coverage reports and uploading them using an API right?

Hell no, I was completely unprepared for the shitshow that lay ahead.

My monorepo contains subprojects written in Python, Javascript, Golang, .NET and Scala. The plan was simple: for each of this language, use the recommended method documented on to upload the report to their server.

Here’s a quick breakdown of the tools used:

Coveralls has a very simple one-page API reference page. To display all the data correctly, these are the requisite information:

Guess what? There’s no standardised way to specify these input. Sure, some libraries behave similarly for certain inputs, e.g. passing the token in through a COVERALLS_REPO_TOKEN is almost universal (goveralls use COVERALLS_TOKEN), but in the bid to support every CI imaginable “out of the box”, each library implements their unique flavour of if-else hell:

Solution? #

Honestly, I don’t know. I don’t even know if the points I raised here are valid concerns at all. I do however believe that my overall experience would have been a lot more comfortable if

I don’t see either happening anytime soon. But thankfully, setting all these up is a one-time thing.