-
Notifications
You must be signed in to change notification settings - Fork 3
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
Skip ahead to re-run only Cypress #1885
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
straightforward workaround
if (commitMessage.includes('ci-force-run')) { | ||
core.setOutput('changed-services', deployAllServices) | ||
return | ||
} | ||
|
||
// force just a cypress re-run | ||
if (commitMessage.includes('cypress re-run')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know about ci-force-run, where would be a good place to document these CI incantations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The force-ci-run
is in the main Readme, but it looks like it's a little buried and hard to pick out. I just pushed up a change that documents the new cypress re-run
and breaks those docs out into a section so it's easier to run across!
Summary
There is a bug -- or really, a lack of functionality -- with cypress re-runs when using the GHA
re-run failed jobs
option, which is a known issue. If you're using a parallelized container build in GHA CI (as we do) and a container or two has a failed spec, choosing to use the GHAre-run failed jobs
feature will load all of the Cypress tests onto that container that has failed and try to re-run everything there. This is unexpected, as I think people assume only the failed specs and other tests that were allocated to the failed container will re-run. Since we have a 25 minute timeout on Cypress runs, and we're running the entire test suite on a fraction of the containers in this scenario, we'll always hit that timeout and get a failed run.I've added a bit of a hack-y workaround here until a re-run feature is taken on by the Cypress team. Basically, if the CI skipping script sees a commit message with
cypress re-run
in it, it'll skip past all the infra and app deploy stages and bring us right to the Cypress run stage. It's not as good as re-running only the failed test specs, but I guess it's better than having to wait for an entire CI deploy due to a flaky test.This also changes the ID for cypress runs to help us correlate the run in Cypress dashboard to the GHA run a little easier.
Related issues
https://qmacbis.atlassian.net/browse/MR-3225