Coverage report is sent before all coverage data jobs are finished


I have two separate jobs that produces coverage reports:

  • first get completed very fast (~5 minutes)
  • second get completed significantly longer (~30 minutes).

As a result I receive coverage report after the first upload done. Yes, after the second upload I see on codecov website correct report but the comment in PR shows incorrect coverage report.

E.g. [Codecov] Fix codecov.yml to wait for all reports before reporting st… by AenBleidd · Pull Request #4278 · BOINC/boinc · GitHub

Did I missed smth in codecov.yml?

Thanks in advance for your help

You can use after_n_builds and set it to 2.

    after_n_builds: 2
1 Like

@tom, I did this in that particular PR I mentioned above. And it doesn’t work

The PR linked to above has this change:

  require_ci_to_pass: yes
    after_n_builds: 2
    wait_for_ci: yes

Note that there is also a setting under “comment” specifically for PR comments.

I do not know if the two interact or relate in any way (e.g. whether setting it for notify also affects comments) - the documentation seems ambiguous on this.

# Comments on PRs
  after_n_builds: 54

That said, there seem to be some circumstances where the PR comment gets updated/edited.

I think this includes additional reports being submitted, but I am currently exploring a similar problem where the PR comment is either missing or doesn’t reflect the latest uploads so cannot comment with certainty on what should be happening.

Apologies that this is all very speculative, but I hope it helps in some way.

1 Like

Thank you for your reply.
Unfortunately, it didn’t help: I received a comment right after first coverage report was uploaded.
So either it works for new PRs only (where there were no reports uploaded before during previous build) or doesn’t work at all.

1 Like

@AenBleidd you have an issue in your yaml. I added this comment that should fix it. Here are instructions on validating your yaml.

Looks like it works. I’ll continue watching it.
@tom, thanks for your help!

1 Like