Skip to content

Commit

Permalink
Fix: Do not post project coverage until it is valid
Browse files Browse the repository at this point in the history
This fixes one issue with codecoverage, wherein the required project coverage
would be posted after 2 finished CI-jobs. And since, our coverage is dependent
upon both unit and coverage tests, posting the coverage too early actually means
that codecov marks the required check as failed.

This sets the number of required builds to 7. This is not a random number, but
is taken from our CI-setup for Mender. The Pipeline right now looks similar to:

1 unit-test + 6 acceptance-tests = 7

Thus Codecov will not comment, or update the coverage status until all the
coverage reports are uploaded, which will then provide a consistent coverage
report, as opposed to the premature coverage which is not posted.

Changelog: None

Signed-off-by: Ole Petter <[email protected]>
  • Loading branch information
oleorhagen committed Jun 24, 2020
1 parent d4f8389 commit 7aad55a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@

comment:
# Only comment after 7 reports uploaded
after_n_builds: 7

codecov:
notify:
# Only notify after 7 reports uploaded
after_n_builds: 7

coverage:
status:
project:
Expand Down

0 comments on commit 7aad55a

Please sign in to comment.