1

With codecov, you can set the target coverage for your project. Assuming a project has 90% coverage right now,

coverage:
  status:
    project:
      default:
        target: auto
        threshold: 1%

this will allow the next pr to reduce the coverage only to a min. of 89%. But with subsequent PRs this could keep dropping. Whereas,

coverage:
  status:
    project:
      default:
        target: 80%

will only allow the PRs which maintain the project coverage above 80%. But a single PR might drop the coverage from 90% to 80%.

Is it possible to have configurations which is like a combination of these two, where a new pr can reduce the project coverage by a max of 1% but the coverage should not go below 80%.

Mat G
  • 360
  • 2
  • 9

1 Answers1

0

You should be able to set both the target value and the threshold value. You can also leverage flags to track coverage more granularly.

You can also set "patch" coverage targets, which might be more important since that will only "consider" the newly added or modified production code. Thus you can start with a low project coverage, but have stricter standards for your patch/diff coverage.

vladko
  • 1,013
  • 14
  • 21
  • I know we can have both target and threshold. What I need is target as auto and also have a min value like when target is set as a number. – Mat G Dec 14 '22 at 05:52