Skip to content

Commit b131464

Browse files
authored
ci: clean up e2e debug tooling (#39374)
* ci: fix e2e debug output setup See #39373 (comment). - use correct unscoped paths for both `store_artifacts` and `store_test_results` - create missing directories to avoid error noise * ci: remove unused Cypress Cloud setup It adds unnecessary noise and complexity to our CI config.
1 parent 3690795 commit b131464

File tree

16 files changed

+22
-74
lines changed

16 files changed

+22
-74
lines changed

.circleci/config.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,13 @@ executors:
2525
docker:
2626
- image: "cypress/browsers:node-18.20.3-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1"
2727
environment:
28-
# This is just used to construct unique `CYPRESS_GROUP_NAME`
29-
E2E_NODE_VERSION: 18.6.0
3028
GATSBY_CPU_COUNT: 2
3129
VERBOSE: 1
3230

3331
e2e22:
3432
docker:
3533
- image: "cypress/browsers:node-22.13.1-chrome-133.0.6943.53-1-ff-135.0-edge-132.0.2957.140-1"
3634
environment:
37-
# This is just used to construct unique `CYPRESS_GROUP_NAME`
38-
E2E_NODE_VERSION: 22.13.1
3935
GATSBY_CPU_COUNT: 2
4036
VERBOSE: 1
4137

@@ -456,7 +452,6 @@ jobs:
456452
type: string
457453
executor: e2e<< parameters.e2e_executor_suffix >>
458454
steps:
459-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_PATH_PREFIX}"' >> "$BASH_ENV"
460455
- e2e-test:
461456
test_path: e2e-tests/path-prefix
462457

@@ -568,7 +563,6 @@ jobs:
568563
type: string
569564
executor: e2e<< parameters.e2e_executor_suffix >>
570565
steps:
571-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_DEV_RUNTIME_REACT_18}"' >> "$BASH_ENV"
572566
# We use curl in this test suite but it isn't available in all images we use
573567
- run: apt-get update && apt-get install -y curl
574568
- e2e-test:
@@ -582,11 +576,9 @@ jobs:
582576
type: string
583577
executor: e2e<< parameters.e2e_executor_suffix >>
584578
steps:
585-
- run: echo 'export CY_CLOUD_PROD_RUNTIME_OFFLINE_REACT_18="${CY_CLOUD_PROD_RUNTIME_OFFLINE_REACT_18}"' >> "$BASH_ENV"
586-
- run: echo 'export CY_CLOUD_PROD_RUNTIME_REACT_18="${CY_CLOUD_PROD_RUNTIME_REACT_18}"' >> "$BASH_ENV"
587579
- e2e-test:
588580
test_path: e2e-tests/production-runtime
589-
test_command: CYPRESS_PROJECT_ID=5k8zbj CYPRESS_RECORD_KEY=${CY_CLOUD_PROD_RUNTIME_REACT_18} yarn test && CYPRESS_PROJECT_ID=yvdct2 CYPRESS_RECORD_KEY=${CY_CLOUD_PROD_RUNTIME_OFFLINE_REACT_18} yarn test:offline
581+
test_command: yarn test && yarn test:offline
590582

591583
themes_e2e_tests_development_runtime:
592584
parameters:
@@ -596,7 +588,6 @@ jobs:
596588
type: string
597589
executor: e2e<< parameters.e2e_executor_suffix >>
598590
steps:
599-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_THEMES_DEV_RUNTIME}"' >> "$BASH_ENV"
600591
- e2e-test:
601592
test_path: e2e-tests/themes
602593
test_command: cd development-runtime; gatsby-dev --force-install --scan-once; yarn test
@@ -609,7 +600,6 @@ jobs:
609600
type: string
610601
executor: e2e<< parameters.e2e_executor_suffix >>
611602
steps:
612-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_THEMES_PROD_RUNTIME}"' >> "$BASH_ENV"
613603
- e2e-test:
614604
test_path: e2e-tests/themes
615605
test_command: cd production-runtime; gatsby-dev --force-install --scan-once; yarn test
@@ -622,7 +612,6 @@ jobs:
622612
type: string
623613
executor: e2e<< parameters.e2e_executor_suffix >>
624614
steps:
625-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_MDX}"' >> "$BASH_ENV"
626615
- e2e-test:
627616
test_path: e2e-tests/mdx
628617

@@ -634,13 +623,12 @@ jobs:
634623
type: string
635624
executor: e2e<< parameters.e2e_executor_suffix >>
636625
steps:
637-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_VISUAL_REGRESSION}"' >> "$BASH_ENV"
638626
- e2e-test:
639627
test_path: e2e-tests/visual-regression
640628
- store_artifacts:
641-
path: e2e-tests/visual-regression/<< parameters.e2e_executor_suffix >>/__diff_output__
629+
path: e2e-tests/visual-regression/__diff_output__
642630
- store_test_results:
643-
path: e2e-tests/visual-regression/cypress/<< parameters.e2e_executor_suffix >>/results
631+
path: e2e-tests/visual-regression/cypress/results
644632

645633
e2e_tests_contentful:
646634
parameters:
@@ -650,17 +638,16 @@ jobs:
650638
type: string
651639
executor: e2e<< parameters.e2e_executor_suffix >>
652640
steps:
653-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_CONTENTFUL}"' >> "$BASH_ENV"
654641
- e2e-test:
655642
test_path: e2e-tests/contentful
656643
# we build a second time to see if warm/cached builds are successful
657644
- e2e-test:
658645
test_path: e2e-tests/contentful
659646
test_command: yarn build
660647
- store_artifacts:
661-
path: e2e-tests/contentful/<< parameters.e2e_executor_suffix >>/__diff_output__
648+
path: e2e-tests/contentful/__diff_output__
662649
- store_test_results:
663-
path: e2e-tests/contentful/cypress/<< parameters.e2e_executor_suffix >>/results
650+
path: e2e-tests/contentful/cypress/results
664651

665652
e2e_tests_trailing-slash:
666653
parameters:
@@ -670,11 +657,10 @@ jobs:
670657
type: string
671658
executor: e2e<< parameters.e2e_executor_suffix >>
672659
steps:
673-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_TRAILING_SLASH}"' >> "$BASH_ENV"
674660
- e2e-test:
675661
test_path: e2e-tests/trailing-slash
676662
- store_test_results:
677-
path: e2e-tests/trailing-slash/cypress/<< parameters.e2e_executor_suffix >>/results
663+
path: e2e-tests/trailing-slash/cypress/results
678664

679665
e2e_tests_adapters:
680666
parameters:
@@ -684,11 +670,10 @@ jobs:
684670
type: string
685671
executor: e2e<< parameters.e2e_executor_suffix >>
686672
steps:
687-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_ADAPTERS}"' >> "$BASH_ENV"
688673
- e2e-test:
689674
test_path: e2e-tests/adapters
690675
- store_test_results:
691-
path: e2e-tests/adapters/cypress/<< parameters.e2e_executor_suffix >>/results
676+
path: e2e-tests/adapters/cypress/results
692677

693678
e2e_tests_adapters_monorepo:
694679
parameters:
@@ -698,13 +683,12 @@ jobs:
698683
type: string
699684
executor: e2e<< parameters.e2e_executor_suffix >>
700685
steps:
701-
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_ADAPTERS}"' >> "$BASH_ENV"
702686
- e2e-test:
703687
test_path: e2e-tests/adapters
704688
test_command: cd workspace; gatsby-dev --force-install --scan-once; cd ..; yarn test
705689
pre_gatsby_dev_command: ./make-monorepo.sh
706690
- store_test_results:
707-
path: e2e-tests/adapters/cypress/<< parameters.e2e_executor_suffix >>/results
691+
path: e2e-tests/adapters/cypress/results
708692

709693
starters_validate:
710694
executor: node

e2e-tests/adapters/cypress/results/.gitkeep

Whitespace-only changes.

e2e-tests/adapters/make-monorepo.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,5 @@ echo '{ "workspaces": ["workspace"], "scripts": { "test": "EXTRA_NTL_CLI_ARGS=\"
1717
# update netlify.toml build command and publish dir
1818
sed -i.bak -e 's/npm run build/npm run build -w workspace/g' -e 's/public/workspace\/public/g' workspace/netlify.toml
1919

20-
# update workspace's package.json to have correct path to helper script after moving site fixture into subdirectory
21-
sed -i.bak -e 's/..\/..\/scripts\/cypress-run-with-conditional-record-flag.js/..\/..\/..\/scripts\/cypress-run-with-conditional-record-flag.js/g' workspace/package.json
22-
2320
git init
2421

e2e-tests/adapters/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"cy:open": "cypress open --browser chrome --e2e",
1414
"develop:debug": "start-server-and-test develop http://localhost:8000 'npm run cy:open -- --config baseUrl=http://localhost:8000'",
1515
"ssat:debug": "start-server-and-test serve http://localhost:9000 cy:open",
16-
"test:template": "cross-env-shell CYPRESS_GROUP_NAME=\"adapter:$ADAPTER nodejs:$E2E_NODE_VERSION / trailingSlash:${TRAILING_SLASH:-always} / pathPrefix:${PATH_PREFIX:--} / excludeDatastoreFromBundle:${GATSBY_EXCLUDE_DATASTORE_FROM_BUNDLE:-false} / monorepo:${E2E_MONOREPO:-false}\" TRAILING_SLASH=$TRAILING_SLASH PATH_PREFIX=$PATH_PREFIX node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome --e2e --config-file \"cypress/configs/$ADAPTER.ts\" --env TRAILING_SLASH=$TRAILING_SLASH,PATH_PREFIX=$PATH_PREFIX",
17-
"test:template:debug": "cross-env-shell CYPRESS_GROUP_NAME=\"adapter:$ADAPTER nodejs:$E2E_NODE_VERSION / trailingSlash:${TRAILING_SLASH:-always} / pathPrefix:${PATH_PREFIX:--} / excludeDatastoreFromBundle:${GATSBY_EXCLUDE_DATASTORE_FROM_BUNDLE:-false} / monorepo:${E2E_MONOREPO:-false}\" TRAILING_SLASH=$TRAILING_SLASH PATH_PREFIX=$PATH_PREFIX npm run cy:open -- --config-file \"cypress/configs/$ADAPTER.ts\" --env TRAILING_SLASH=$TRAILING_SLASH,PATH_PREFIX=$PATH_PREFIX",
16+
"test:template": "cross-env-shell TRAILING_SLASH=$TRAILING_SLASH PATH_PREFIX=$PATH_PREFIX cypress run --browser chrome --e2e --config-file \"cypress/configs/$ADAPTER.ts\" --env TRAILING_SLASH=$TRAILING_SLASH,PATH_PREFIX=$PATH_PREFIX",
17+
"test:template:debug": "cross-env-shell TRAILING_SLASH=$TRAILING_SLASH PATH_PREFIX=$PATH_PREFIX npm run cy:open -- --config-file \"cypress/configs/$ADAPTER.ts\" --env TRAILING_SLASH=$TRAILING_SLASH,PATH_PREFIX=$PATH_PREFIX",
1818
"test:debug": "npm-run-all -s build:debug ssat:debug",
1919
"test:netlify": "cross-env TRAILING_SLASH=always node scripts/deploy-and-run/netlify.mjs test:template",
2020
"test:smoke": "node smoke-test.mjs",

e2e-tests/contentful/cypress/results/.gitkeep

Whitespace-only changes.

e2e-tests/contentful/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"start-server-and-test": "start-server-and-test serve http://localhost:9000 cy:run",
4343
"serve": "gatsby serve",
4444
"cy:open": "cypress open --browser chrome --e2e",
45-
"cy:run": "node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome --e2e"
45+
"cy:run": "cypress run --browser chrome --e2e"
4646
},
4747
"repository": {
4848
"type": "git",

e2e-tests/development-runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"start-server-and-test": "start-server-and-test develop http://localhost:8000 serve-static-files http://localhost:8888 combined",
5151
"start-server-and-test:locally": "start-server-and-test develop http://localhost:8000 serve-static-files http://localhost:8888 cy:open",
5252
"cy:open": "cypress open --browser chrome --e2e",
53-
"cy:run": "node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome --e2e",
53+
"cy:run": "cypress run --browser chrome --e2e",
5454
"playwright": "playwright test --project=chromium",
5555
"playwright:debug": "playwright test --project=chromium --debug",
5656
"start-server-and-test:playwright": "start-server-and-test develop http://localhost:8000 serve-static-files http://localhost:8888 playwright",

e2e-tests/mdx/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"serve": "gatsby serve",
3939
"cy:open:develop": "cypress open --browser chrome --e2e --config-file cypress/configs/develop.ts",
4040
"cy:open:build": "cypress open --browser chrome --e2e --config-file cypress/configs/build.ts",
41-
"cy:run:build": "CYPRESS_GROUP_NAME=production:$E2E_NODE_VERSION node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome --e2e --config-file cypress/configs/build.ts",
42-
"cy:run:develop": "CYPRESS_GROUP_NAME=development:$E2E_NODE_VERSION node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome --e2e --config-file cypress/configs/develop.ts",
41+
"cy:run:build": "cypress run --browser chrome --e2e --config-file cypress/configs/build.ts",
42+
"cy:run:develop": "cypress run --browser chrome --e2e --config-file cypress/configs/develop.ts",
4343
"reset": "node scripts/reset.js",
4444
"update": "node scripts/update.js"
4545
},

e2e-tests/path-prefix/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"serve:site": "gatsby serve --prefix-paths",
3636
"serve:assets": "node scripts/serve.js",
3737
"cy:open": "cypress open --browser chrome --e2e",
38-
"cy:run": "node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome --e2e"
38+
"cy:run": "cypress run --browser chrome --e2e"
3939
},
4040
"devDependencies": {
4141
"cpy-cli": "^4.2.0",

e2e-tests/production-runtime/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
"cy:open:offline": "npm run cy:open -- --env TEST_PLUGIN_OFFLINE=y",
4646
"cy:run": "npm run cy:run:normal && npm run cy:run:bot",
4747
"cy:run:offline": "npm run cy:run:normal -- --env TEST_PLUGIN_OFFLINE=y",
48-
"cy:run:normal": "node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome --e2e",
49-
"cy:run:bot": "cross-env CYPRESS_CONNECTION_TYPE=bot node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome --e2e --config specPattern=\"cypress/integration/prefetching.js\"",
48+
"cy:run:normal": "cypress run --browser chrome --e2e",
49+
"cy:run:bot": "cross-env CYPRESS_CONNECTION_TYPE=bot cypress run --browser chrome --e2e --config specPattern=\"cypress/integration/prefetching.js\"",
5050
"playwright": "playwright test --project=chromium",
5151
"playwright:debug": "playwright test --project=chromium --debug",
5252
"start-server-and-test:playwright": "start-server-and-test serve http://localhost:9000 serve-static-files http://localhost:8888 playwright",

0 commit comments

Comments
 (0)