I recently logged an issue in the codecov-action repository.
It looks for me that there is some issue with codecov-action tool. In brief, code coverage data aggregated incorrectly in case there are 2 workflows that run on the same commit. It would be nice if someone from dev. team can take a look.
tom
May 29, 2020, 3:58pm
2
Hi @tysonite , I responded on the thread, but in case you miss it, the tl;dr is to switch to checkout@v1
opened 07:31PM - 14 May 20 UTC
closed 03:57PM - 29 May 20 UTC
I noted that results are aggregated incorrectly in case 2 workflows run on the s… ame commit. The example of the weird behavior is here:
- unit tests: https://github.com/robotframework/robotframework/pull/3530/checks?check_run_id=675082523
- acceptance tests: https://github.com/robotframework/robotframework/pull/3530/checks?check_run_id=675082266
Both runs [report](https://github.com/robotframework/robotframework/pull/3530/checks?check_run_id=675082266#step:2:452) HEAD as:
```
HEAD is now at 76ca8fe
```
But unit tests upload code coverage there:
```
-> Uploading
-> View reports at https://codecov.io/github/robotframework/robotframework/commit/50020bb6362e2f766319bd8d81c51d5b37c1b48d
```
While acceptance tests upload it using different commit:
```
-> Uploading
-> View reports at https://codecov.io/github/robotframework/robotframework/commit/76ca8fea01bcd4c0a5d6bc7117f3bbc5951eeef9
```
As head is `76ca8fe`, I suspect codecov-action running in unit tests upload data to wrong commit.
As well, the comment in the [PR](https://github.com/robotframework/robotframework/pull/3530) I referenced above by means of GH action runs, states 74% of coverage which is actually wrong:
![image](https://user-images.githubusercontent.com/196535/81978648-827e4300-9634-11ea-9348-eb8e4118b7f6.png)
Kooking at the history of changes to the that comment, one may find correct 94% that was overwritten later:
![image](https://user-images.githubusercontent.com/196535/81978858-c8d3a200-9634-11ea-9b68-76737ea2ea21.png)