From 97fa5bab8039a8820b9ab3ca6df0a24fb25fecaa Mon Sep 17 00:00:00 2001 From: Justin Clift Date: Fri, 1 Sep 2023 19:56:13 +1000 Subject: [PATCH] Fix Cypress not running in forked repos --- client/cypress/cypress.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/cypress/cypress.js b/client/cypress/cypress.js index 583346e85a..c3957e3d62 100644 --- a/client/cypress/cypress.js +++ b/client/cypress/cypress.js @@ -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") { @@ -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" } ); }