Conversation
MarcL
left a comment
There was a problem hiding this comment.
Looks good but should we add some tests around this?
|
I don't know how :( Testing GitHub Actions is a mystery to me |
|
Could we test the |
|
Sounds like a good approach |
|
I had a quick dig into this last night for you @ascorbic to see how we could best unit test it. I wrote an example test like this: but the issue is that Suggestions which could help:
Any thoughts? I don't want to block this PR with overly complicated testing. |
Which problem is this pull request solving?
Often there is a delay before a published package is available on npm. Currently this action attempts to deal with this by retrying if there is an error. However it only catches this for newly-published packages, not new versions of existing packages.
Describe the solution you've chosen
This PR changes the code to catch this situation by handling not just HTTP errors (missing new packages return a 404), but also
ETARGETerrors which mean missing version.Describe alternatives you've considered
Example: Another solution would be [...]
Checklist
Please add a
xinside each checkbox:A picture of a cute animal (not mandatory but encouraged)
