Skip to content
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

feat(devex): cypress roulette #29181

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

feat(devex): cypress roulette #29181

wants to merge 7 commits into from

Conversation

mariusandra
Copy link
Collaborator

Problem

We spend too much on cypress with not much to show.

Changes

Run only 4 random cypress tests each run.

How did you test this code?

See the above 🤪

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR modifies the Cypress E2E testing strategy to run only 4 randomly selected tests per CI run instead of all tests.

  • Added a new step in the chunks job that selects 4 random spec files using the commit's SHA as a seeded random source
  • Changed matrix variable from chunk to spec throughout the workflow for clarity
  • Updated artifact naming to use the specific spec name instead of job index
  • Modified the Cypress run command to execute only the selected spec files
  • Implemented a reproducible selection mechanism using the commit SHA to ensure consistent test selection for the same code

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@@ -58,32 +58,36 @@ jobs:
- name: Check out
uses: actions/checkout@v3

- name: Group spec files into chunks of three
- name: Pick 4 random spec files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think once a day we should run them all and send an event to posthog on failure so we can alert from CDP / track incidence

but otherwise 100

these tests are slow and low value

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that works for me. Though the only thing these tests actually test for me is that the plugin server is running. I didn't (yet) explicitly verify if the same issue causes playwright to break as well... will report back.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity I put the name of the test into the action's name, but this just means none will actually be required:

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, they're a bit of a dead end cos everyone just finds them annoying...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, we'd make them not required and tell everyone, plz be careful-er now

any migration to playwright that is done carefully will just take too long

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants