Codecov patch keeps failing and I cannot turn it off

Hi there. First of all thanks for the service, I really appreciate the opportunity to explore the coverage of my Python libs.

I am reaching out here because I think my current codecov.yml file does not seem to work as expected.

The problems I see are the following

  1. Almost every PR has a failing codecov/patch check, see for instance this one https://github.com/mwouts/jupytext/pull/638, or any other recent one
  2. Every PR is commented with a report that the coverage is decreasing by >10%, and then the comment is edited when all the CI jobs are successful (and in the end the coverage does not decrease)

I have tried hard

but none of the two approaches worked yet.

Could you please help me draft a codecov.yml file that not cause failing codecov jobs? Unless of course when the coverage decreases by more than, say, 0.5%?

codecov:
  require_ci_to_pass: yes

coverage:
  status:
    project:
      default: false  # disable the default status that measures entire project
      tests:
        paths:
          - "tests/"
        target: 100%
      source:
        paths:
          - "jupytext/"
        target: 97%
        threshold: 0.002
    patch:
      default:
        target: 80%  # new contributions should have a coverage at least equal to target

@mwouts, you can also view instructions on how to validate your yaml.

1 Like

Thank you Tom! The corresponding PR has a working codecov/patch, it had been a long time I had not seen that!

Now would you have an advice on who to address the second issue, that is, coverage status and emails are being added before the end of the two GitHub actions (pip and conda and linux / mac / windows) ? The coverage is not good until all the jobs pass, and I would prefer not to receive these emails until all the jobs are OK:

Thank you!

@mwouts, I think you are looking for this or this

1 Like

Thank you Tom.
I think what I was looking for was this:

comment:
  after_n_builds: 10

since I have 5 pip jobs + 5 conda jobs.

1 Like