Closed bahmutov closed 1 year ago
Seeing similar behavior for one of our GHA workflows. Imho the action should just clean up processes rather than leaving them dangling and ππ» the GHA will clean up all leftovers.
Edit: likely GHAs only clean up processes until the entire workflow is complete rather than in between steps!?
Yeah I think the processes don't end - we're trying to start the same server right afterwards, and the port is blocked.
In the meantime, our (somewhat overkill) workaround is:
- run: killall node
Edit: Wonder if this is a general thing with some things running on GitHub Actions (maybe Corepack?):
Or more finegrained, if your server runs on 8080
- run: kill $(lsof -t -i :8080)
This is imho a real 'documentation bug' - here https://github.com/cypress-io/github-action#start-server
it says
the server will run in the background and will shut down after tests complete
and
Note: GitHub cleans up the running server processes automatically. This action does not stop them.
both lines seem to contradict eachother.
@commonpike
Is this just a documentation issue for you or do you have an example workflow using the current version of the action (v5
) where it is causing you a problem?
@MikeMcC399 - no, I'm killing the server now and that works. I didn't read the note until I found out the first line was not true :-)
So it's just a documentation issue.
Probably if there was a need to start a server a second time, then I would put it into a separate job rather than a step in the same job. I'm not sure if the original issue from 2 years ago is the optimal way to use the action. In any case the documentation could be made more precise.
I haven't looked at this too closely, but I think in the original example I would have just deleted the second start: npm start
, unless there is some special reason to want to restart the server.
:tada: This issue has been resolved in version 5.8.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Seems from https://github.com/bahmutov/cypress-grep-example results that not:
The smoke tests pass just fine, but the second action launch is showing an error