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

Fix Cypress not running in forked repos #6413

Merged
merged 1 commit into from
Sep 1, 2023
Merged

Conversation

justinclift
Copy link
Member

What type of PR is this?

  • Bug Fix

Description

This PR allows the Cypress CI tests to run in forks, without any changes being needed. At the moment it's failing in forks due to the --record option always being applied, even though it only makes sense for our main getredash/redash repo.

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Merging #6413 (97fa5ba) into master (abe70ab) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #6413   +/-   ##
=======================================
  Coverage   60.87%   60.87%           
=======================================
  Files         155      155           
  Lines       12718    12718           
  Branches     1729     1729           
=======================================
  Hits         7742     7742           
  Misses       4747     4747           
  Partials      229      229           

@justinclift
Copy link
Member Author

justinclift commented Sep 1, 2023

@guidopetri @eradman @konnectr @snickerjp Anyone up for taking a look over this? It's a super simple PR. 😄

@snickerjp
Copy link
Member

snickerjp commented Sep 1, 2023

I think it is a very good way. 👍
In my repository, should CYPRESS_OPTIONS be set to blank?

@justinclift
Copy link
Member Author

In my repository, should CYPRESS_OPTIONS be set to blank?

You don't need to. 😄

The existing code in this cypress.js file has this line:

if (GITHUB_REPOSITORY === "getredash/redash") {

So, this PR has the CYPRESS_OPTIONS line be blank unless the repository it's running on is getredash/redash. For that one specific repository, it sets the option line to --record.

The blank default value is what lets Cypress run on all other repositories, such as yours and mine. 😄

@justinclift justinclift merged commit c70d397 into master Sep 1, 2023
15 checks passed
@justinclift justinclift deleted the cypress_options_v1 branch September 1, 2023 11:32
@snickerjp
Copy link
Member

Cool! Thanks for the description.

@justinclift
Copy link
Member Author

No worries at all. 😄

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