-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cypress job do not exit on fail (Gitlab CI) #5845
Comments
FYI, Maybe i'm not the only one with this issue : |
@AlexLo33 Can you try running the tests in CI passing Also, there is an issue with hanging in CI here that we're working to fix: #5475 It may be related, but I haven't seen this happen in the same way your describing - only when a test fails. You may want to try downgrading to 3.4.1 regardless, see if this is an issue isolated to a recent release in the past 6 weeks. |
I already have tried to downgrade to v3.4.1, same issue... |
I have found the issue, it was not with Cypress but with Gitlab... For informations : I started my server in background with So I had to, in the same script, launch my application, run my tests, save the exit code out by Cypress, kill my application and return the saved exit code. And, it works! This issue can be closed |
@AlexLo33 we recommend using something like https://github.com/bahmutov/start-server-and-test to start and shutdown server after the tests complete, you can find a few examples in our https://on.cypress.io/ci guide as well |
Hi everyone ! I don't know if it's a Cypress bug or a Gitlab bug but i'm stuck with my pipeline...
Current behavior:
I run my tests in a job with Gitlab.
When all tests are OK (no fails), the job end correctly and the next job is launched
BUT
When one test fail, the job is still running altough the Cypress process is trying to exit with code 1
gitlab-ci.yml
package.json :
Desired behavior:
My job will "successfully" fail after a test fail
With Debug mode, when all tests passed :
With debug mode when a test fail :
Steps to reproduce: (app code and test code)
My test code :
Success :
Fail : (input with name login123 does not exist)
Versions
Cypress 3.7.0
The text was updated successfully, but these errors were encountered: