meta icon indicating copy to clipboard operation
meta copied to clipboard

Specify a minimum amount of codecov coverage for PR success

Open choldgraf opened this issue 5 years ago • 3 comments
trafficstars

We are using codecov across a few repositories for our coverage. However we don't have any official practice around using it. Should we agree upon a convention for "how much new additions need to be covered for a PR to pass"? And if so, can we document how to set this per repository?

choldgraf avatar Aug 01 '20 17:08 choldgraf

FYI you can use https://docs.codecov.io/docs/codecovyml-reference, e.g. I added one to https://github.com/executablebooks/sphinx-tabs/blob/master/codecov.yml

chrisjsewell avatar Aug 18 '20 22:08 chrisjsewell

Coverage % is obviously a bit subjective, but ideally I guess > 90% is ideal and 80% ok currently:

markdown-it-py: 95% myst-parser: 91% myst-nb: 85% jupyter-cache: 81% jupyter-book: 82% ...

chrisjsewell avatar Aug 18 '20 22:08 chrisjsewell

In myst-parser, I have now added:

coverage:
  status:
    project:
      default:
        target: 90%
        threshold: 0.5%
    patch:
      default:
        target: 85%
        threshold: 0.5%

chrisjsewell avatar Aug 19 '20 01:08 chrisjsewell