go-coverage-report icon indicating copy to clipboard operation
go-coverage-report copied to clipboard

Cannot display code coverage report if artifacts from target branch have expired

Open fgrosse opened this issue 1 year ago • 6 comments

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.

fgrosse avatar Mar 16 '24 09:03 fgrosse

GitHub actions artifacts by default expire after 90 days (which is also the maximum).

fgrosse avatar Mar 16 '24 21:03 fgrosse

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.

bejelith avatar Aug 05 '24 16:08 bejelith

I just ran into this same problem. Not a great first impression. :(

wmcnamee-coreweave avatar Sep 23 '24 22:09 wmcnamee-coreweave

Ran into the same problem. Is there a fix being implemented? I'm also willing to send a PR if the author wants.

parvezmrobin avatar Oct 27 '24 21:10 parvezmrobin

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?

necipallef avatar Dec 31 '24 14:12 necipallef

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?

sszemer avatar Mar 11 '25 15:03 sszemer