Let’s say that we want to add code coverage to our pipeline. We could do that with many different tools. However, since the goal is not to teach you how to set up code coverage or to explore which tool is better, we’ll skip the selection process and use the Codecov service. Keep in mind that I’m not saying that it is better than the others nor that you must use a service for that, but rather that I needed an example to demonstrate a few new pipeline instructions. Codecov seems like the right candidate.

Integrating our pipeline with Codecov

What do we need to do to integrate our pipeline with the Codecov service? If we check their instruction for Go applications, we’ll see that we should output code coverage to a text file. Since I’m trying to make the examples as agnostic to programming languages as possible, we’ll skip changing the Makefile that contains testing targets assuming that you’ll read the Codecov instructions later on if you choose to use it. So, instead of telling you to apply specific changes to Makefile, we’ll download a Gist I prepared.

Get hands-on with 1400+ tech skills courses.