Skip to content

Commit

Permalink
Fix Cypress not running in forked repos
Browse files Browse the repository at this point in the history
  • Loading branch information
justinclift committed Sep 1, 2023
1 parent abe70ab commit 97fa5ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/cypress/cypress.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function runCypressCI() {
CYPRESS_PROJECT_ID_ENCODED,
CYPRESS_RECORD_KEY_ENCODED,
GITHUB_REPOSITORY,
CYPRESS_OPTIONS, // eslint-disable-line no-unused-vars
} = process.env;

if (GITHUB_REPOSITORY === "getredash/redash") {
Expand All @@ -76,10 +77,11 @@ function runCypressCI() {
if (CYPRESS_RECORD_KEY_ENCODED) {
process.env.CYPRESS_RECORD_KEY = atob(`${CYPRESS_RECORD_KEY_ENCODED}`);
}
process.env.CYPRESS_OPTIONS = "--record";
}

execSync(
"COMMIT_INFO_MESSAGE=$(git show -s --format=%s) docker-compose run --name cypress cypress ./node_modules/.bin/percy exec -t 300 -- ./node_modules/.bin/cypress run --record",
"COMMIT_INFO_MESSAGE=$(git show -s --format=%s) docker-compose run --name cypress cypress ./node_modules/.bin/percy exec -t 300 -- ./node_modules/.bin/cypress run $CYPRESS_OPTIONS",
{ stdio: "inherit" }
);
}
Expand Down

0 comments on commit 97fa5ba

Please sign in to comment.