go-coverage-report
go-coverage-report copied to clipboard
Cannot display code coverage report if artifacts from target branch have expired
It may happen that the uploaded code coverage artifact has expired already when we run the action. This is likely on repositories which do not receive changes frequently and thus, when a PR is opened, the code coverage from main will be missing.
GitHub actions artifacts by default expire after 90 days (which is also the maximum).
This is also a problem when initialing a new repository, the coverage report fails because main has never reported before - in this case better then failing would be nice to just have the current code coverage values imho.
I just ran into this same problem. Not a great first impression. :(
Ran into the same problem. Is there a fix being implemented? I'm also willing to send a PR if the author wants.
I have this PR as a suggested solution, this PR introduces workflow_dispatch alternative to re-create expired artifacts. Would you be open to this solution?
i'm trying to add this action to my ci, but it seems i cannot merge it because i don't have a report from main branch. maybe such situation should be handled without failing the job? just quit if no main report found?