How to skip Cypress Cloud PR status check if not needed #26071
Unanswered
cgutierrezpa
asked this question in
CI setup
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone,
I have this situation in my team right now. So we are using GitHub integration for Cypress Cloud, so that we can have this
cypress: <group>
status check on every PR to get the results of the E2E tests as a comment in the PR and also to prevent PR merges if such check fails (plus other checks that we have). As the project grows, we notice that it is inefficient to run E2E tests on every single PR, because some of them include changes that won't affect the result of those tests, like docs, unit test changes, unrelated CI changes, etc. The problem comes when Cypress adds thisPending
status check state for every single PR, and only updates it when the CI of the PR starts running the tests with the linked--group
name. So when the CI skips the E2E jobs because the PR doesn't need to run them, the status check will never get updated and it gets stuck in that Pending state forever, making it unable to work with conditional E2E.Is there a way to achieve this? Any kind of way to mark the check as
Complete
orSkipped
so that the PR can get merged?If there is no way to do that right now, is there a way we can self-implement this
cypress: group
check that Cypress Cloud includes out of the box? In the sense of grouping the results of the parallel tests in 1 single status check, that could be skipped on demand?One thing that I want to mention is that we cannot rely on the status checks of the jobs themselves (without Cypress Cloud integration) because, as we are running the tests in parallel of 5-6 CI jobs, we can have a complete green pass of the entire test suite even if a job fails in the setup steps prior to running the tests, because the entire E2E suite will simply run all the tests with 1 CI job less. This results in having 1 failed status check, while the others are green and all the E2E tests passed successfully, but still preventing the PR from merge.
Thank you for your time!
Beta Was this translation helpful? Give feedback.
All reactions