# Github status check reported too early

**URL:** <https://community.codecov.com/t/github-status-check-reported-too-early/3043>\
**Category:** Support\
**Created:** [July 16, 2021, 7:58pm UTC](https://community.codecov.com/t/github-status-check-reported-too-early/3043 "2021-07-16T19:58:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jywarren](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jywarren/32/1991_2.png) [@jywarren](https://community.codecov.com/u/jywarren)\
**Post date:** [July 16, 2021, 7:58pm UTC](https://community.codecov.com/t/github-status-check-reported-too-early/3043/1 "2021-07-16T19:58:09Z")

</div>

### Description

I’ve finally got a 4-job GitHub Actions CI workflow reporting all CodeCov reports correctly, as reported here: [Codecov](https://app.codecov.io/gh/publiclab/plots2/compare/9909) (it seems a little lower than the 80% I knew before but… closer than earlier attempts).

The PR is: [add wait\_for\_ajax for barnstar system test by jywarren · Pull Request #9909 · publiclab/plots2 · GitHub](https://github.com/publiclab/plots2/pull/9909)

However the reported coverage in GitHub’s check is 59.59% (-22.56%).

If you look at the commits, that’s one behind the most recent assessment, so it skips the final merge commit listed at [Codecov](https://app.codecov.io/gh/publiclab/plots2/compare/9909/commits) which would bring it up to 74%.

### Commit SHAs

> **[Code coverage done right.](https://app.codecov.io/gh/publiclab/plots2/commit/8b6a73e9d7d7c44a8f5b4ea627f70192c64ecd15/)**
>
> Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

### Repository

> <https://github.com/publiclab/plots2/pull/9909>
>
> Re: #9873

### CI/CD or Build URL

> <https://github.com/publiclab/plots2/pull/9909/checks>
>
> Re: #9873

### Uploader

It’s uploading via the codecov gem. The results were the same using the CodeCov GitHub Action, which I tested earlier.

### Codecov Output

In mine it’s done in 4 different jobs; but here is the final job:

```auto

  _____ _
 / ____ | | |
| | _____ | | ______  _______
| | / _ \ / _\`|/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |__/ (_| (_) \ V /
 \ _____\___ / \ __,_|\___ |\ ___\___ / \_/
                               Ruby-0.5.2
==> GitHub Actions detected
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: token=secret&flags&package=ruby-0.5.2&service=github-actions&branch=barnstar-wait&pr=9909&slug=publiclab%2Fplots2&build=1038545312&commit=8b6a73e9d7d7c44a8f5b4ea627f70192c64ecd15
-> Pinging Codecov
https://codecov.io/upload/v4?token=secret&flags&package=ruby-0.5.2&service=github-actions&branch=barnstar-wait&pr=9909&slug=publiclab%2Fplots2&build=1038545312&commit=8b6a73e9d7d7c44a8f5b4ea627f70192c64ecd15
-> Uploading to
https://storage.googleapis.com/codecov/v4/raw/2021-07-16/86C0015BA4E3819F6F955369719E30A5/450780ff05cb1cf5e64f27510dff36cadb200031/8a0820d2-e380-4d98-ae7f-e1f36a42b079.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20210716%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20210716T193342Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=614b99264492d96cd8f8f622e3a672814df130f25f44db1bba4d96fd883241f4
    View reports at https://codecov.io/github/publiclab/plots2/commit/450780ff05cb1cf5e64f27510dff36cadb200031

```

### Expected Results

I would expect it to either wait until the final job is complete before reporting a status check, OR to update once it got the last report.

### Actual Results

It seems to have reported a failure due to lower than expected coverage because it didn’t wait until the final job report uploaded, or it didn’t re-report after that.

### Additional Information

For commenting, i set `after_n_builds` to 4, which is a really nice feature:

> <https://github.com/publiclab/plots2/blob/3d3de3f43256c8195c575ec07060d3b783cd3c62/codecov.yml#L6>

However i don’t see a way to tell CodeCov to wait on the status check until 4 builds. That would solve this problem.

Thank you, i love CodeCov!!!

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [July 19, 2021, 1:36am UTC](https://community.codecov.com/t/github-status-check-reported-too-early/3043/2 "2021-07-19T01:36:04Z")

</div>

Hi @jywarren I think you’re looking for [notify#after\_n\_builds](https://docs.codecov.com/docs/codecovyml-reference#codecovnotifyafter_n_builds)

---

<div class="post-metadata">

**Author:** ![jywarren](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jywarren/32/1991_2.png) [@jywarren](https://community.codecov.com/u/jywarren)\
**Post date:** [July 19, 2021, 8:44pm UTC](https://community.codecov.com/t/github-status-check-reported-too-early/3043/3 "2021-07-19T20:44:50Z")

</div>

That looks just right, thank you so much!!!

> <https://github.com/publiclab/plots2/pull/9917>
>
> copy of https://github.com/publiclab/plots2/pull/9909 for codeCov debugging cc h…ttps://github.com/publiclab/plots2/issues/9873
