Skip to content

ci(test): run Cypress E2E workflows in Chrome - #1266

Merged
ale18V merged 3 commits into
mainfrom
ci/cypress-use-chrome
Oct 28, 2026
Merged

ale18V merged 3 commits into
mainfrom
ci/cypress-use-chrome

Conversation

@ale18V

@ale18V ale18V commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Cypress is officially planning to deprecate its bundled Electron test browser:

In addition, Electron exhibits subtle behavioral and rendering divergences in headless Linux environments (e.g. forced --disable-gpu and software fallback quirks).

This PR:

  1. Updates the GitHub Actions CI workflows to explicitly execute Cypress test jobs in Google Chrome (browser: chrome).
  2. Adds support for selecting the Cypress browser via the DISCO_E2E_BROWSER environment variable (e.g. DISCO_E2E_BROWSER=firefox, chrome, edge).
  3. Documents browser selection for E2E tests in docs/CONTRIBUTING.md.

@ale18V

ale18V commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

As a side note: the cypress action GH action documentation states that the defaultBrowser of the cypress config is used if none is specified in the action parameters. And if that is undefined then electron is used (which is the case RN).

@JulienVig two points:

  1. I didn't set an explicit fallback in the defaultBrowser - it's only set by the env variable right now. I didn't want to hardcode chrome or firefox as it depends on which browser the developer is used to on their system. Do we want to have a default browser such as chrome same for everyone when the env var is not set?
  2. Even if we set the defaultBrowser I think it's better to be explicit and still set the browser in the action params which is what this PR does.

@JulienVig JulienVig left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All good thanks! Being explicit on the CI browser sounds fine to me. However I think we should set a fallback browser.

Comment thread docs/CONTRIBUTING.md Outdated
Comment thread webapp/cypress.config.ts Outdated
with: { name: all-builds }
- uses: cypress-io/github-action@v7
with:
browser: chrome

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you look into chrome-for-testing (doc)? mabe this would be a good option for the CI

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Do we want to pin the browser version? I don't think we're doing anything particularly fancy + if our tests were to actually fail on a new chrome version it'd be desirable to know. Also we'd have to keep updated the version we use if we decide to pin it. I'll look into it more deeply that's just my first impression

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I was also wondering about this, I also think that failing on different chrome versions is what we want even if it could be flaky depending on the CI machine. Maybe we can ensure that we log the browser version in the CI for troubleshooting?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Cypress already logs the major version https://github.com/epfml/disco/actions/runs/40660156098/job/122722420865?pr=1266#step:6:36

Not sure if we need more granularity than that but I added logging of the whole version number

Comment thread docs/CONTRIBUTING.md Outdated
@ale18V
ale18V merged commit 2d778f3 into main Oct 28, 2026
21 checks passed
@ale18V
ale18V deleted the ci/cypress-use-chrome branch October 28, 2026 09:20
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