# Coverage not updated when CI failed

**URL:** <https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404>\
**Category:** Support\
**Tags:** github\
**Created:** [December 23, 2021, 11:16pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404 "2021-12-23T23:16:00Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ismoh](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ismoh/32/2267_2.png) [@Ismoh](https://community.codecov.com/u/Ismoh)\
**Post date:** [December 23, 2021, 11:16pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/1 "2021-12-23T23:16:00Z")

</div>

### Description

I have two github workflow jobs. One for windows and one for ubuntu.  
As long as one job failed, the code coverage isn’t updated, but this is what I want.  
The repo contains a mod for a game and it should be valid for each OS.  
If ubuntu isn’t working, but windows is, then I expect the code coverage to be updated.

### CI/CD URL

Ubuntu: [Workflow runs · Ismoh/NoitaMP · GitHub](https://github.com/Ismoh/NoitaMP/actions/workflows/ubuntu-latest-lua-unit-testing.yml)  
Windows: [Windows Lua Unit Testing · Workflow runs · Ismoh/NoitaMP · GitHub](https://github.com/Ismoh/NoitaMP/actions/workflows/windows-latest-lua-unit-testing.yml)

### Codecov Output

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

For some reason there is no output for the succeeded one.

### Expected Results

I’ve expected the shown commit above would have one build and updated code coverage.

### Actual Results

“There was an error processing coverage reports.”

### Additional Information

Here is a commit where both jobs succeeded:

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

You can see both builds.  
In addition to this: Merge seems not to be working, but let’s fix this issue first.  
Did I do anything wrong?

---

<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:** [December 27, 2021, 3:30pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/2 "2021-12-27T15:30:18Z")

</div>

@Ismoh, what looks like is happening is that the Windows build (always) doesn’t have a coverage report that is getting processed by Codecov. So when your Ubuntu build fails, it shows `There was an error processing coverage reports`, because the Windows one won’t be processed.

So the issue with the Windows build is that the file directory on upload has files presented as

```auto
noita-mp/files/lib/external/init_package_loading.lua
noita-mp/files/lib/external/luaunit.lua
noita-mp/files/lib/external/os_name.lua

```

in the coverage report, but the coverage files show them as

```auto
noita-mp\files\lib\external\init_package_loading.lua
noita-mp\files\lib\external\luaunit.lua
noita-mp\files\lib\external\os_name.lua
noita-mp\files\scripts\util\file_util.lua 

```

Not the switch from `/` to `\`.

I would suggest changing your `Windows` workflow to

```auto
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v2
      with:
        directory: ${{ github.workspace }}
        flags: unittesting
        functionalities: network
        name: Windows Lua Unit Testing
        verbose: true

```

Not 100% sure that will work, but let me know.

---

<div class="post-metadata">

**Author:** ![Ismoh](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ismoh/32/2267_2.png) [@Ismoh](https://community.codecov.com/u/Ismoh)\
**Post date:** [December 28, 2021, 1:41pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/3 "2021-12-28T13:41:38Z")

</div>

Thank you for your fast reply!

Where do you see the differences? Can I see this as well?

> [@tom](#):
>
> Not the switch from `/` to `\` .

Are the path separators a problem? I unfortunatelly don’t understand the quoted answer, sorry!

> [@tom](#):
>
> `functionalities: network`

Changed it as you suggested, let’s see if this helps 🙂

---

<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:** [December 28, 2021, 6:20pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/4 "2021-12-28T18:20:48Z")

</div>

Sorry, I meant `note` not `not`, my mistake. You can view the raw reports in the `build` tab of a commit, like the [link you posted](https://codecov.io/gh/Ismoh/NoitaMP/commit/37d43892153897ba94c23f1b72270e16d504d786/build).

I think the separators are a problem, but I’m not 100% sure. I figure adding the `functionalities` might fix it.

---

<div class="post-metadata">

**Author:** ![Ismoh](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ismoh/32/2267_2.png) [@Ismoh](https://community.codecov.com/u/Ismoh)\
**Post date:** [December 30, 2021, 8:33am UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/5 "2021-12-30T08:33:54Z")

</div>

Thank you!  
Looks like the suggestion you made, does not help, because there is no merge of two coverage reports. I added ‘shell: bash’ on githubs step to fix the path separator problem. Let’s see if it helps.

---

<div class="post-metadata">

**Author:** ![Ismoh](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ismoh/32/2267_2.png) [@Ismoh](https://community.codecov.com/u/Ismoh)\
**Post date:** [December 30, 2021, 12:00pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/6 "2021-12-30T12:00:17Z")

</div>

Github doesn’t like that yml property.

I added this workaround, but I even don’t see any changes on codecov, therefore I don’t know if this fixes anything.

> <https://github.com/Ismoh/NoitaMP/blob/e2b919efb02e795948d05030eba04d70cc983a71/.github/workflows/windows-latest-lua-unit-testing.yml#L120-L130>

I still need some assit!  
Thank you in advantage!

---

<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:** [December 30, 2021, 3:07pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/7 "2021-12-30T15:07:54Z")

</div>

The property doesn’t have to do with merging reports. Can you show me what you tried?

> [@Ismoh](#):
>
> does not help, because there is no merge of two coverage reports.

---

<div class="post-metadata">

**Author:** ![Ismoh](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ismoh/32/2267_2.png) [@Ismoh](https://community.codecov.com/u/Ismoh)\
**Post date:** [December 30, 2021, 5:45pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/8 "2021-12-30T17:45:48Z")

</div>

Sure thing. See below:

> [@Ismoh](#):
>
> I added ‘shell: bash’ on githubs step to fix the path separator problem.

This is what I’ve done:

> <https://github.com/Ismoh/NoitaMP/commit/49789ad37d48f00ddcb30bbe345402c7a77fc4e8>

> [@Ismoh](#):
>
> Github doesn’t like that yml property.

This didn’t help, because the workflow didn’t started. Error message:  
[https://github.com/Ismoh/NoitaMP/actions/runs/1636837564](https://github.com/Ismoh/NoitaMP/actions/runs/1636837564)

Besides that, this is a workaround I tried, but codecov coverage percentage on codecov is still different.

> [@Ismoh](#):
>
> I added this workaround, but I even don’t see any changes on codecov, therefore I don’t know if this fixes anything.
> 
> [https://github.com/Ismoh/NoitaMP/blob/e2b919efb02e795948d05030eba04d70cc983a71/.github/workflows/windows-latest-lua-unit-testing.yml#L120-L130](https://github.com/Ismoh/NoitaMP/blob/e2b919efb02e795948d05030eba04d70cc983a71/.github/workflows/windows-latest-lua-unit-testing.yml#L120-L130)
> 
> I still need some assit!

This is a workaround, which I don’t like, because there is no different on codecov atm.

Besides that I need to fix the windows workflow in total. It’s broken, because of infinite loading. I’ll be back if it is working again, to see changes on codecov.

---

<div class="post-metadata">

**Author:** ![Ismoh](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ismoh/32/2267_2.png) [@Ismoh](https://community.codecov.com/u/Ismoh)\
**Post date:** [December 30, 2021, 6:47pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/9 "2021-12-30T18:47:32Z")

</div>

A workflow run where both builds succeeded:

> **[Code coverage done right.](https://codecov.io/gh/Ismoh/NoitaMP/commit/016f234f5b3bdeee45f6f01cc1dd521b2020bb79/build)**
>
> Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

Comparison of summary:  
windows:

```auto
==============================================================================
Summary
==============================================================================

File Hits Missed Coverage
----------------------------------------------------------------------------------------------------
D:/a/NoitaMP/NoitaMP/.testing/tests/files/scripts/util/file_util_test.lua 135 1 99.26%
D:/a/NoitaMP/NoitaMP/.testing/tests/files/scripts/util/guid_test.lua 23 0 100.00%
D:/a/NoitaMP/NoitaMP/.testing/tests/files/scripts/util/tabe_extensions_test.lua 30 0 100.00%
noita-mp/files/lib/external/logging.lua 116 71 62.03%
noita-mp/files/lib/external/luaunit.lua 690 815 45.85%
noita-mp/files/lib/external/os_name.lua 22 12 64.71%
noita-mp/files/scripts/init/init_.lua 3 0 100.00%
noita-mp/files/scripts/init/init_logger.lua 9 0 100.00%
noita-mp/files/scripts/init/init_package_loading.lua 56 16 77.78%
noita-mp/files/scripts/util/file_util.lua 151 72 67.71%
noita-mp/files/scripts/util/guid.lua 58 8 87.88%
noita-mp/files/scripts/util/table_extensions.lua 13 0 100.00%
noita-mp/files/scripts/util/util.lua 11 2 84.62%
----------------------------------------------------------------------------------------------------
Total 1317 997 56.91%

```

ubuntu:

```auto
==============================================================================
Summary
==============================================================================

File Hits Missed Coverage
-----------------------------------------------------------------------------------------------------------------
/home/runner/work/NoitaMP/NoitaMP/.testing/tests/files/scripts/util/file_util_test.lua 124 11 91.85%
/home/runner/work/NoitaMP/NoitaMP/.testing/tests/files/scripts/util/guid_test.lua 23 0 100.00%
/home/runner/work/NoitaMP/NoitaMP/.testing/tests/files/scripts/util/tabe_extensions_test.lua 30 0 100.00%
noita-mp/files/lib/external/logging.lua 116 71 62.03%
noita-mp/files/lib/external/luaunit.lua 702 806 46.55%
noita-mp/files/lib/external/os_name.lua 22 12 64.71%
noita-mp/files/scripts/init/init_.lua 3 0 100.00%
noita-mp/files/scripts/init/init_logger.lua 9 0 100.00%
noita-mp/files/scripts/init/init_package_loading.lua 56 16 77.78%
noita-mp/files/scripts/util/file_util.lua 132 88 60.00%
noita-mp/files/scripts/util/guid.lua 58 8 87.88%
noita-mp/files/scripts/util/table_extensions.lua 13 0 100.00%
noita-mp/files/scripts/util/util.lua 11 2 84.62%
-----------------------------------------------------------------------------------------------------------------
Total 1299 1014 56.16%

```

What I expect:  
codecov merge both results into the overview:

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

Only one example file for coverage comparison:

> **[Code coverage done right.](https://app.codecov.io/gh/Ismoh/NoitaMP/blob/develop/.testing/tests/files/scripts/util/file_util_test.lua)**
>
> Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

It is 91,85% which is only ubuntu coverage report value.

Is the merge broken?

---

<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:** [January 3, 2022, 4:57pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/10 "2022-01-03T16:57:14Z")

</div>

@Ismoh, the merge is not the issue, the fact that we cannot process the Windows file due to the backslashes is.

I don’t think I saw it, can you post the CI link to where you added

```auto
functionalities: network

```

---

<div class="post-metadata">

**Author:** ![Ismoh](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ismoh/32/2267_2.png) [@Ismoh](https://community.codecov.com/u/Ismoh)\
**Post date:** [January 5, 2022, 7:59pm UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/11 "2022-01-05T19:59:06Z")

</div>

> <https://github.com/Ismoh/NoitaMP/commit/809312fc591a1145d702e050f40372b4cfcd6fcb#diff-2644d72d9290dc1202c7a4c34b8defe5a3a15828e51e9215a0363070520547b4>

> <https://github.com/Ismoh/NoitaMP/actions/runs/1660099956>

> **[Code coverage done right.](https://codecov.io/gh/Ismoh/NoitaMP/commit/809312fc591a1145d702e050f40372b4cfcd6fcb/build)**
>
> Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

Do you need more info?

---

<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:** [January 26, 2022, 2:30am UTC](https://community.codecov.com/t/coverage-not-updated-when-ci-failed/3404/12 "2022-01-26T02:30:26Z")

</div>

@Ismoh apologies, I think this got lost in my queue.

I tried opening the logs for the links you provided, and I’m seeing `Error: We are currently unable to download the log. Please try again later.` which isn’t super helpful. Would you be able to re-run or make the change again?
