fatiando / community

Community resources, guidelines, meeting notes, authorship policy, maintenance, etc.
Other
8 stars 4 forks source link

Move Codecov pushes away from test steps in Actions #151

Open santisoler opened 4 months ago

santisoler commented 4 months ago

Description:

Lately we've been experiencing some pushes to codecov failing, particularly if the PR comes from branches in forks. This failures are random and not related to a particular reason. We might need to research more on this. In the meantime we can make some changes to improve the contributor experience.

  1. ~Currently every runner pushes to codecov. This might generate a lot of hits to codecov that could limit the number of pushes. Since codecov only tracks test coverage, we don't need one push per runner: only having one runner using the latest (or "optional") dependencies should be enough.~ Actually, in some scenarios max coverage is achieved by combining coverage from different runners.
  2. Having the codecov push inside the test jobs creates some confusions: if the codecov push, the test job is marked as failed, even if the test passed. We could move the push to codecov to its own job to improve this.
  3. Having the coverage report as an artifact we can download could be helpful. We can use that report with local tools (like https://github.com/andythigpen/nvim-coverage) without the need to rerun all tests. Also, we can use this report to check which lines aren't being covered in CI.

In summary, I think we should apply these steps to our test workflows:

Update 2024-05-14

After playing with the initial ideas in fatiando/harmonica#502, I've updated the text of the tasks that should be carried out. In summary: make all runners update the coverage.xml file as an artifact, and make the new codecov-upload job to download them all and push them all together to codecov in a single run.

Apply to:

Further instructions:

We want your help!

We know that maintenance tasks are very demanding, so we don't expect a single person to tackle this issue by themselves. Any help is very welcomed, so please comment below that you want to take care of the changes on any repository and we will assign it to you.