codecov.io is a hosted code coverage solution that provides highly integrated tools to group, merge, archive, and compare coverage reports.
Questions tagged [codecov]
101 questions
26
votes
1 answer
Why is JaCoCo not covering my String switch statements?
I have a switch statement that extracts an addressing mode from a String and I've written unit tests to cover, what I thought was every eventuality but JaCoCo seems to skip my switch statements, resulting in lower coverage.
Why, if all my case…

Ross Drew
- 8,163
- 2
- 41
- 53
13
votes
2 answers
Go: Wrong coverage when there is no tests for a package
I have a Go project with the following structure:
foo/foo.go
foo/foo_test.go
main.go
As you notice, there is no test for main.go.
I collect the coverage report using the following command:
go test ./foo ./ -coverprofile=coverage.txt…

Sasha Shpota
- 9,436
- 14
- 75
- 148
12
votes
1 answer
codecov unable to collect data using pytest - "Coverage.py warning: No data was collected."
I'm trying to setup codecov on my public travis repo and so far haven't been able to successfully generate a report and upload it to codecov.io. I appear to receive an erroneous report in terminal that says 0% of my code is covered along with a…

Frozenglass
- 145
- 1
- 9
9
votes
2 answers
Getting llvm-cov to talk to codecov.io
I'm in the process of (finally!) setting up code coverage monitoring for my brand new C++ project. Due to the fact that I need some advanced C++20 features (read, coroutines), I am using clang 6 as compiler.
Now, I followed this guide on how to do…

Matteo Monti
- 8,362
- 19
- 68
- 114
8
votes
4 answers
codecov fails in github actions
backgrond
my setup for codecov has worked well so far
you can regular updates with each pr commits here
I haven't change my repo settings
as I've inadvertently pushed a folder that I wasn't supposed to,
then I merged a pr to remove said…

Francesco Iapicca
- 2,618
- 5
- 40
- 85
8
votes
1 answer
Configuring codecov token in GitHub Actions .yaml for an R package
I'm trying to set up codecov monitoring for a public R package, where GitHub Actions will run covr::codecov. I'm looking at this .yaml example (Source):
- name: Test coverage
if: matrix.r == '3.6'
run: |
Rscript -e…

Sam Firke
- 21,571
- 9
- 87
- 105
7
votes
1 answer
Rust coverage using kcov does not appear correct
When I record code coverage of my Rust project using codecov.io, the coverage does not appear correct.
The unwrap() function and the end bracket are not covered
The function declaration is not covered
This is very strange.
I cannot provide the…

mrLSD
- 688
- 1
- 5
- 14
7
votes
0 answers
code coverage with Heroku CI
We are in the process of privatising our repo and have moved our CI to use Heroku's service. We are now trying to work out how to get code coverage reports so that we don't merge with reduced coverage. I am trying to work out how to generate such…

JMurphyWeb
- 382
- 1
- 11
6
votes
0 answers
Codecov : coverage and complexity rate
I'm testing a project and I use Codecov to publish the coverage rate of my tests.
Codecov uses the report generated by Jacoco and so far it works fine.
Codecov doesn't display only the coverage rates,
but also the complexity rates of the tests.
I…

Julien Berthoud
- 721
- 8
- 24
5
votes
1 answer
Optimal usage of codecov in a monorepo context with separate flags for each package
I was just wondering what’s the best way to configure codecov for a monorepo setting. For example, let’s say I have packages A and B under my monorepo. The way I’m currently using codecov is by using a github action codecov/codecov-action@v1, by…

Devorein
- 1,112
- 2
- 15
- 23
5
votes
1 answer
Why is codecov with lcov not working correctly on Travis but on my local Linux Mint?
I tried to add Codecov to my CI build system for my library.
The travis script looks like this:
lcov --directory . --capture --output-file coverage.info --gcov-tool gcov-8 # capture coverage info
lcov --remove coverage.info '/usr/*' --output-file…

AMS
- 51
- 1
- 5
4
votes
1 answer
Generating test coverage reports only once within a GitHub Actions matrix
I have a test suite that I want to run in a matrix strategy using GitHub Actions. I want to generate a code coverage report for my tests, but only for a single matrix item.
Here is a copy of the action I'm working with:
name: test
on: [pull_request,…

slifty
- 13,062
- 13
- 71
- 109
4
votes
3 answers
how to ignore a line in `dart-lang/coverage`
use case
codecov sees super as in need for test,
not sure being sure if writing a test for this keyword
would be meaningful
how to write such a test
I'd like to exclude the line from coverage until my doubts are cleared
question
how do I ignore a…

Francesco Iapicca
- 2,618
- 5
- 40
- 85
4
votes
1 answer
Codecov, Github actions and Angular 11 "No coverage report found"
I am trying to publish a code coverage of an Angular (v11) library to Codecov.io through Github actions
I have set it up the official Codecov github actions from the marketplace
name: tests
on:
pull_request:
branches: [ master ]
jobs:
…

Murhaf Sousli
- 12,622
- 20
- 119
- 185
4
votes
2 answers
CodeCov cannot find reports
I am trying to get codecov to run and process the reports generated by Jacoco for my multibuild Java Gradle project. However, when I run the codecov script (bash <(curl -s https://codecov.io/bash)), I get the following output:
x> No CI provider…

Snappawapa
- 1,697
- 3
- 20
- 42