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

**URL:** <https://community.codecov.com/t/the-codecov-badge-is-always-red-despite-the-settings-in-yml-configuration-file/1980>\
**Category:** Bug Fixes\
**Created:** [September 16, 2020, 12:15pm UTC](https://community.codecov.com/t/the-codecov-badge-is-always-red-despite-the-settings-in-yml-configuration-file/1980 "2020-09-16T12:15:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vvaltchev](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/vvaltchev/32/1093_2.png) [@vvaltchev](https://community.codecov.com/u/vvaltchev)\
**Post date:** [September 16, 2020, 12:15pm UTC](https://community.codecov.com/t/the-codecov-badge-is-always-red-despite-the-settings-in-yml-configuration-file/1980/1 "2020-09-16T12:15:15Z")

</div>

### Description

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.

### Repository

[https://github.com/vvaltchev/tilck](https://github.com/vvaltchev/tilck)

### CI/CD

Microsoft Azure Pipelines

### Uploader

[https://codecov.io/bash](https://codecov.io/bash)

### Commit SHAs

[c46b9f9](https://github.com/vvaltchev/tilck/commit/c46b9f9c264aa61d54b8af5ff2fd083e4db81139)

And many others, since August 2020.

### Codecov YAML

```
coverage:
  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:49.9968855Z  
> 2020-09-16T11:00:49.9969085Z  
> 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/coverage.info 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;36mhttps://docs.codecov.io/docs/fixing-reportse[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 [https://codecov.io](https://codecov.io)  
> 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.1135119Z   
> 2020-09-16T11:00:51.6494529Z e[0;90m-\>e[0m Uploading to  
> 2020-09-16T11:00:51.6500869Z   
> Signature=7d7003a0f188b487e10b9ff7cf8664ca8ae304f573065a4ab2d3559ec223a0a9  
> 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.6602477Z  
> 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;36mhttps://codecov.io/github/vvaltchev/tilck/commit/6c6a52264e7d98e3cfa813f47b0f65ac00561f40e[0m  
> 2020-09-16T11:00:51.9182410Z

### Steps to Reproduce

Just run my coverage pipeline:

> **[Pipelines](https://vkvaltchev.visualstudio.com/Tilck/_build?definitionId=4&_a=summary)**

**Expected behavior:** See in my README.md, 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.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [September 22, 2020, 2:32pm UTC](https://community.codecov.com/t/the-codecov-badge-is-always-red-despite-the-settings-in-yml-configuration-file/1980/2 "2020-09-22T14:32:17Z")

</div>

Hi @vvaltchev, I think you are looking for [this](https://docs.codecov.io/docs/codecovyml-reference#coveragerange).

---

<div class="post-metadata">

**Author:** ![vvaltchev](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/vvaltchev/32/1093_2.png) [@vvaltchev](https://community.codecov.com/u/vvaltchev)\
**Post date:** [September 22, 2020, 3:53pm UTC](https://community.codecov.com/t/the-codecov-badge-is-always-red-despite-the-settings-in-yml-configuration-file/1980/3 "2020-09-22T15:53:10Z")

</div>

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:

```
coverage:
  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 https://codecov.io/validate
Valid!

{
  "coverage": {
    "range": [
      0.0,
      80.0
    ],
    "round": "nearest",
    "precision": 1
  }
}

```

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

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [September 22, 2020, 3:56pm UTC](https://community.codecov.com/t/the-codecov-badge-is-always-red-despite-the-settings-in-yml-configuration-file/1980/4 "2020-09-22T15:56:57Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![vvaltchev](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/vvaltchev/32/1093_2.png) [@vvaltchev](https://community.codecov.com/u/vvaltchev)\
**Post date:** [September 22, 2020, 4:19pm UTC](https://community.codecov.com/t/the-codecov-badge-is-always-red-despite-the-settings-in-yml-configuration-file/1980/6 "2020-09-22T16:19:49Z")

</div>

Thanks for that, @tom !!

---

<div class="post-metadata">

**Author:** ![vvaltchev](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/vvaltchev/32/1093_2.png) [@vvaltchev](https://community.codecov.com/u/vvaltchev)\
**Post date:** [October 31, 2020, 12:21am UTC](https://community.codecov.com/t/the-codecov-badge-is-always-red-despite-the-settings-in-yml-configuration-file/1980/7 "2020-10-31T00:21:33Z")

</div>

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 🙂

Vlad

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [November 2, 2020, 1:58pm UTC](https://community.codecov.com/t/the-codecov-badge-is-always-red-despite-the-settings-in-yml-configuration-file/1980/8 "2020-11-02T13:58:47Z")

</div>

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!
