Gaffer
Gaffer copied to clipboard
Fix broken codecov reports
The codecov bot has been commenting very strange results for a while now and we were not sure why, example: https://github.com/gchq/Gaffer/pull/2709#issuecomment-1184543574. In this linked PR, one line has changed in a test but the reports shows completely different files changed.
The strange results often ends up in the bot being ignored, so it should be fixed.
I have discovered that the root of the issue is that the ci workflow (which tests the code and uploads coverage) is not run on develop, therefore, there is not an up to date report to compare against.
I think we should update the ci action to:
- run on
developandv2-alpha - use
codecov/codecov-action@v3
As well as deleting the bugged historical reports.
Alternatively we could look into codacy
As an additional explanation to the above: I think the pattern of effectively having 2 develop branches (develop and v2-alpha) also can break codecov.
For a proper fix, we need to:
- merge
v2-alphaintodevelop(release 2.0.0) - make the coverage upload run on
develop - delete the bugged historical reports
As we are not using the GitHub App Integration it seems that codecov will no longer work after May 2023. Unless the Github App Integration is installed (more info here).
Another option would be to use a GitHub Action for coverage - this wouldn't be as full featured.
Since the CI now does run on develop, I think this issue should just track the move to the GitHub App as suggested by @GCHQDeveloper314
Fixed by https://github.com/gchq/Gaffer/pull/2953