github-action: Job hangs after tests pass
I have a job that uses a custom command to run on multiple .cy files. The job fans out using the matrix strategy.
The timeout is set to 20 minutes. Some of the jobs finish, but a couple are mysteriously timing out even after the tests complete. This example has only 2 tests that finish long before 20 minutes:

Here is the cypress step:
- name: Cypress run
uses: cypress-io/github-action@v3
with:
browser: chrome
install: false
working-directory: services/webapp
record: true
group: ${{ matrix.file-path }}
command:
pnpx cypress run --spec ${{ matrix.file-path }} --record ${{ secrets.CYPRESS_RECORD_KEY
}}
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TZ: UTC
timeout-minutes: 20
I was previously running cypress directly and this issue only started after I switched to using cypress-io/github-action. I canβt determine what is unique about the files that time out. Any ideas would be much appreciated. π
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 40 (1 by maintainers)
@MikeMcC399 I see the summary:
Feel free to close this issue when it seems resolved. Itβs no longer relevant for me. thanks π
Thank you so much for your contributions and aid in troubleshooting, @MikeMcC399 !
If you are experiencing this issue, please provide a reproducible example along with resource values for the job, so we can better investigate.
Thanks!
@ricardo-dematos
Please do transfer your other points (video and Node.js version) to new separate issues.
@ricardo-dematos
I just have a few comments - unfortunately I donβt have a solution!
As far as we know, this error message is just cosmetic.
If there is no summary, then I would assume that Cypress (invoked through Cypress: Module API) has not returned control to
github-action, so the problem would be in Cypress - possibly a resource constraint, however that is just a theory.Video compression is resource intensive. It is planned to make
video: falsethe default in the upcoming Cypress 13 version. You may like to disable it now. (Itβs already like that in https://github.com/cypress-io/github-action/blob/master/examples/browser/cypress.config.js in the browser examples here.)This is a known issue with Firefox run from Cypress, see https://github.com/cypress-io/cypress/issues/18415
github-actionruns as a JavaScript GitHub Action and the version is defined separately through https://github.com/cypress-io/github-action/blob/d69252d52b9a31bad4f418f05ba2bc83687a02eb/action.yml#L99-L101The app runs under v18 in your case and Cypress runs under v16, which is a bit strange, but it is the way it works.
Are any of the contributors here able to post a reproducible example of the action timing out? That would be helpful to get closer to identifying the root cause.
All of the examples workflows in .github/workflows of this repository complete without a problem, although none of them are resource intensive (assuming that is a contributing factor to the timeout).
The main.yml workflow from the cypress-io/cypress-realworld-app. which is more complex, also passes without timing out.
So the standard examples canβt be used for troubleshooting this issue.
I donβt know how to troubleshoot this further if there are no error messages (apart from the timeout). Hopefully the Cypress.io team will have some ideas.
@jonasberglund
Coincidentally there was an announcement today https://github.blog/changelog/2023-06-21-github-hosted-larger-runners-for-actions-are-generally-available/
@MikeMcC399 that sounds correct
Yeah, might be more likely thenβ¦ It runs all perfectly locally but in CI itβs been not so good.
Iβll try that and see what I can find out. Thank you!