The codecov badge is always red, despite the settings in YML configuration file


The codecov badge is always red, despite the configuration in .codecov.yml.
Note: the current configuration hasn’t been touched for more than an year and it worked as expected all the time. For example, with a range 0…80, a coverage of 69% (current value) makes the badge to look almost completely green. At some point (maybe one month ago), while the whole coverage reporting continued to work correctly, the badge became red and it’s red since then. Attempts to fix the problem by renaming ‘.codecov.yml’ to ‘codecov.yml’ or using “…” (triple dots) instead of “…” (double dots) in range had no effect. It is unclear where the problem is. Looks like a server-side problem to me.



Microsoft Azure Pipelines


Commit SHAs


And many others, since August 2020.

Codecov YAML

  range: 0...80
  round: nearest
  precision: 1

Note: I’ve tried both with .codecov.yml and with codecov.yml. Also, I’ve tried both with “…” in range and with “…” (double dots) as the documentation used both the syntax variants.

Codecov Output

I don’t see how it is relevant except that the codecov script confirms that it finds the file.
Note: I had to remove some URLs because of 7-links per post limitation for new users.
Also, sorry for console escape codes, but that’s what I get as log file from my CI.

2020-09-16T11:00:49.9965592Z _____ _
2020-09-16T11:00:49.9965969Z / | | |
2020-09-16T11:00:49.9966353Z | | ___ __| | ___ ___ _____ __
2020-09-16T11:00:49.9966764Z | | / _ \ / ` |/ _ / / _ \ \ / /
2020-09-16T11:00:49.9967154Z | |
| (
) | (
| | __/ (
| (
) \ V /
2020-09-16T11:00:49.9967556Z ______/ _,|_|____/ _/
2020-09-16T11:00:49.9968498Z Bash-20200910-5a68dc2
2020-09-16T11:00:50.0079470Z e[0;90m==>e[0m Azure Pipelines detected.
2020-09-16T11:00:50.0183666Z e[0;90mproject root:e[0m /__w/1/s
2020-09-16T11:00:50.0197275Z e[0;90m–>e[0m token set from env
2020-09-16T11:00:50.0349191Z e[0;90mYaml found at:e[0m .codecov.yml
2020-09-16T11:00:50.0910491Z e[0;90m==>e[0m gcov disabled
2020-09-16T11:00:50.0917192Z e[0;90m==>e[0m Python coveragepy not found
2020-09-16T11:00:50.0918520Z e[0;90m==>e[0m Searching for coverage reports in:
2020-09-16T11:00:50.0919231Z e[0;32m+e[0m /__w/1/s
2020-09-16T11:00:50.1242480Z e[0;90m->e[0m Found 2 reports
2020-09-16T11:00:50.1267899Z e[0;90m==>e[0m Detecting git/mercurial file structure
2020-09-16T11:00:50.1360378Z e[0;90m==>e[0m Reading reports
2020-09-16T11:00:50.1438709Z e[0;32m+e[0m /__w/1/s/other/coverage_build.yml e[0;90mbytes=1247e[0m
2020-09-16T11:00:50.1520102Z e[0;32m+e[0m /__w/1/s/build/ e[0;90mbytes=381925e[0m
2020-09-16T11:00:50.1601786Z e[0;90m==>e[0m Appending adjustments
2020-09-16T11:00:50.1602586Z e[0;36m[0m
2020-09-16T11:00:51.0012924Z e[0;32m+e[0m Found adjustments
2020-09-16T11:00:51.0060425Z e[0;90m==>e[0m Gzipping contents
2020-09-16T11:00:51.1080080Z e[0;90m==>e[0m Uploading reports
2020-09-16T11:00:51.1085330Z e[0;90murl:e[0m
2020-09-16T11:00:51.1087031Z e[0;90mquery:e[0m
2020-09-16T11:00:51.1131464Z e[0;90m->e[0m Pinging Codecov
2020-09-16T11:00:51.6494529Z e[0;90m->e[0m Uploading to
2020-09-16T11:00:51.6595484Z % Total % Received % Xferd Average Speed Time Time Time Current
2020-09-16T11:00:51.6600836Z Dload Upload Total Spent Left Speed
2020-09-16T11:00:51.9099824Z 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
2020-09-16T11:00:51.9110373Z 100 120k 0 0 100 120k 0 480k --:–:-- --:–:-- --:–:-- 482k
2020-09-16T11:00:51.9154632Z e[0;32m->e[0m View reports at e[0;36m[0m

Steps to Reproduce

Just run my coverage pipeline:

Expected behavior: See in my, on Github, a GREEN codecov badge, as in the past.

Actual behavior: The codecov badge is RED, even if everything else works.

Flakiness? Since the last month, the behavior is unaltered (always showing the wrong color).

Additional Information

None. I believe I’ve provided enough details. One more thing: it is NOT an image caching problem as I’ve tried from different machines and also, the coverage value changed from 68% to 69%. The problem is badge’s color. It should be green, not red, given my configuration. Looks like there’s a problem with badge color at the server side OR my configuration is being ignored somehow.

Hi @vvaltchev, I think you are looking for this.

Hi Tom.
Thanks for taking interest in my problem. Actually I read and re-read that documentation several times, but I’ve found nothing that could help me. I’ve also posted the coverage file I used as part of the problem description. I see nothing wrong with it. Also, I believe it’s worth stating again that the EXACT configuration file I’m using worked as-it-is for more than one year. I haven’t changed anything (related to codecov) for long time.

I’ll re-post the coverage file once more here for you:

  range: 0..80
  round: nearest
  precision: 1

And, I repeat, I also tried using “…” instead of “…” for the range AND nothing changed. I’ve also found the codecov validator and I’ve checked with it my file and it says my file is VALID. Here’s the output:

$ curl -X POST --data-binary @.codecov.yml

  "coverage": {
    "range": [
    "round": "nearest",
    "precision": 1

Could you please dig into it further and/or suggest changes to my .codecov.yml file?

@vvaltchev, we made some changes with our badge API recently, it is possible that this wasn’t ported over properly. I’ll bring this up to the product team.

Thanks for that, @tom !!

Hi @tom,
I wanted to point out that now the CodeCov badge on my project has become green again without changing anything at my side. That proved that the issue was a server-side problem, but now it has been fixed, so I wanted to thank the CodeCov team for that. I don’t know if my bug report helped or not, but it doesn’t matter at the end because the problem has gone :slight_smile:


1 Like

Awesome @vvaltchev! I was off for a few days last week when the fix was pushed. Glad to see that it’s fixed for you!