Skipping Codecov report on master branch

Hi,

Is there a way to tell codecov not to run on the master branch or have a higher tolerance on master before failing?

We’re fine having Codecov making a build fail in development because we want devs to have an indication of whether or not something may need more testing. However, when we make the decision to merge something to master, its because we’ve decided that coverage was sufficient regardless of what the coverage tool says.

As it is right now, our commits are sometimes marked as failed in Github because Codecov saw coverage going down.

Thanks for your help!

JF

Hi @jfboismenu, would this, be what you’re looking for?

How did I miss this?! Unfortunately, this doesn’t seem to solve my problem. As you can see on this commit, codecov posted something to my commit.

We’re using a Team .yaml file for configuration, as we have 60+ repos as part of our org.

coverage:
  status:
    project:
      default:
        # basic
        threshold: 0.5%
        base: auto
        only_pulls: true

Hi @jfboismenu, would you mind copying that yaml into a repo and seeing if you have the same issue? I suspect the team yaml configuration for that field might have a bug.

Hi Tom!
As you can see, I’ve committed a file at the root of the repo.


If you click on the green check mark next to the commit description you can see codecov still posted a status. I suspect it would have failed if coverage had gone down.

As you can see from my CI pipeline, code cov picked up the settings file.

coverage:
  status:
    project:
      default:
        # basic settings
        only_pulls: true
    patch:
      default:
        # basic settings
        only_pulls: true

@jfboismenu, this should fix it!

Hey! I think I tried what you gave me a while back and that didn’t do it unfortunately, but on a new project I was working on I started with those settings and it worked.

coverage:
  status:
    project:
      default:
        # basic
        target: auto
        threshold: 2%
        # advanced settings
        branches:
          - main
        if_ci_failed: error #success, failure, error, ignore
        informational: false
        only_pulls: true

@jfboismenu sorry, I think I’ve lost context on this one. Are you seeing the issue still on the original repository?