Skip to content

Commit 1e693eb

Browse files
committed
Merge branch 'master' into feat/support-react-19
2 parents c72eb79 + 3690795 commit 1e693eb

File tree

14 files changed

+154
-63
lines changed

14 files changed

+154
-63
lines changed

.circleci/config.yml

Lines changed: 130 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,25 @@ executors:
2121
# don't want to use it regardless, for consistency (and because it can cause problems)
2222
SHARP_IGNORE_GLOBAL_LIBVIPS: 1
2323

24-
aliases:
25-
e2e-executor-env: &e2e-executor-env
26-
GATSBY_CPU_COUNT: 2
27-
VERBOSE: 1
24+
e2e18:
25+
docker:
26+
- image: "cypress/browsers:node-18.20.3-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1"
27+
environment:
28+
# This is just used to construct unique `CYPRESS_GROUP_NAME`
29+
E2E_NODE_VERSION: 18.6.0
30+
GATSBY_CPU_COUNT: 2
31+
VERBOSE: 1
2832

29-
e2e-executor: &e2e-executor
33+
e2e22:
3034
docker:
31-
- image: cypress/browsers:node18.6.0-chrome105-ff104
35+
- image: "cypress/browsers:node-22.13.1-chrome-133.0.6943.53-1-ff-135.0-edge-132.0.2957.140-1"
3236
environment:
33-
<<: *e2e-executor-env
37+
# This is just used to construct unique `CYPRESS_GROUP_NAME`
38+
E2E_NODE_VERSION: 22.13.1
39+
GATSBY_CPU_COUNT: 2
40+
VERBOSE: 1
3441

42+
aliases:
3543
install_node_modules: &install_node_modules
3644
run:
3745
name: Install node modules
@@ -77,11 +85,6 @@ aliases:
7785
condition: << parameters.npm_rebuild >>
7886
steps:
7987
- run: npm rebuild
80-
- run:
81-
name: Step debug info
82-
command: |
83-
yarn list react
84-
yarn why lmdb-store
8588
- run:
8689
name: Run tests
8790
command: yarn jest --ci --runInBand $(yarn -s jest --listTests | sed 's/\/home\/circleci\/project\///g' | circleci tests split)
@@ -100,8 +103,17 @@ aliases:
100103
ignore:
101104
- master
102105
- /docs.+/
106+
matrix:
107+
parameters:
108+
node_version: ["18.2.0", "22.13"]
109+
e2e_executor_suffix: ["18", "22"]
110+
exclude:
111+
- node_version: "18.2.0"
112+
e2e_executor_suffix: "22"
113+
- node_version: "22.13"
114+
e2e_executor_suffix: "18"
103115
requires:
104-
- bootstrap-18.2.0
116+
- bootstrap-<< matrix.node_version >>
105117

106118
integration-test-workflow: &integration-test-workflow
107119
filters:
@@ -437,16 +449,24 @@ jobs:
437449
test_command: yarn test
438450

439451
e2e_tests_path-prefix:
440-
<<: *e2e-executor
452+
parameters:
453+
node_version:
454+
type: string
455+
e2e_executor_suffix:
456+
type: string
457+
executor: e2e<< parameters.e2e_executor_suffix >>
441458
steps:
442459
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_PATH_PREFIX}"' >> "$BASH_ENV"
443460
- e2e-test:
444461
test_path: e2e-tests/path-prefix
445462

446463
e2e_tests_pnp:
447-
executor:
448-
name: node
449-
image: "18.12.0"
464+
parameters:
465+
node_version:
466+
type: string
467+
e2e_executor_suffix:
468+
type: string
469+
executor: e2e<< parameters.e2e_executor_suffix >>
450470
steps:
451471
- checkout
452472
- run: ./scripts/assert-changed-files.sh "packages/*|.circleci/*"
@@ -499,9 +519,12 @@ jobs:
499519
working_directory: /tmp/e2e-tests/gatsby-pnp
500520

501521
e2e_tests_pnpm:
502-
executor:
503-
name: node
504-
image: "18.12.0"
522+
parameters:
523+
node_version:
524+
type: string
525+
e2e_executor_suffix:
526+
type: string
527+
executor: e2e<< parameters.e2e_executor_suffix >>
505528
steps:
506529
- checkout
507530
- run: ./scripts/assert-changed-files.sh "packages/*|.circleci/*"
@@ -538,14 +561,26 @@ jobs:
538561
working_directory: /tmp/e2e-tests/gatsby-pnpm
539562

540563
e2e_tests_development_runtime_with_react_18:
541-
<<: *e2e-executor
564+
parameters:
565+
node_version:
566+
type: string
567+
e2e_executor_suffix:
568+
type: string
569+
executor: e2e<< parameters.e2e_executor_suffix >>
542570
steps:
543571
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_DEV_RUNTIME_REACT_18}"' >> "$BASH_ENV"
572+
# We use curl in this test suite but it isn't available in all images we use
573+
- run: apt-get update && apt-get install -y curl
544574
- e2e-test:
545575
test_path: e2e-tests/development-runtime
546576

547577
e2e_tests_production_runtime_with_react_18:
548-
<<: *e2e-executor
578+
parameters:
579+
node_version:
580+
type: string
581+
e2e_executor_suffix:
582+
type: string
583+
executor: e2e<< parameters.e2e_executor_suffix >>
549584
steps:
550585
- run: echo 'export CY_CLOUD_PROD_RUNTIME_OFFLINE_REACT_18="${CY_CLOUD_PROD_RUNTIME_OFFLINE_REACT_18}"' >> "$BASH_ENV"
551586
- run: echo 'export CY_CLOUD_PROD_RUNTIME_REACT_18="${CY_CLOUD_PROD_RUNTIME_REACT_18}"' >> "$BASH_ENV"
@@ -554,62 +589,102 @@ jobs:
554589
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
555590

556591
e2e_tests_development_runtime_with_react_19:
557-
<<: *e2e-executor
592+
parameters:
593+
node_version:
594+
type: string
595+
e2e_executor_suffix:
596+
type: string
597+
executor: e2e<< parameters.e2e_executor_suffix >>
558598
steps:
559599
- e2e-test:
560600
test_path: e2e-tests/development-runtime
561601
react_version: "19.1.1"
562602

563603
e2e_tests_production_runtime_with_react_19:
564-
<<: *e2e-executor
604+
parameters:
605+
node_version:
606+
type: string
607+
e2e_executor_suffix:
608+
type: string
609+
executor: e2e<< parameters.e2e_executor_suffix >>
565610
steps:
566611
- e2e-test:
567612
test_path: e2e-tests/production-runtime
568613
test_command: yarn test && yarn test:offline
569614
react_version: "19.1.1"
570615

571616
e2e_tests_react_19_compatibility:
572-
<<: *e2e-executor
617+
parameters:
618+
node_version:
619+
type: string
620+
e2e_executor_suffix:
621+
type: string
622+
executor: e2e<< parameters.e2e_executor_suffix >>
573623
steps:
574624
- e2e-test:
575625
test_path: e2e-tests/react-19-compatibility
576626

577627
themes_e2e_tests_development_runtime:
578-
<<: *e2e-executor
628+
parameters:
629+
node_version:
630+
type: string
631+
e2e_executor_suffix:
632+
type: string
633+
executor: e2e<< parameters.e2e_executor_suffix >>
579634
steps:
580635
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_THEMES_DEV_RUNTIME}"' >> "$BASH_ENV"
581636
- e2e-test:
582637
test_path: e2e-tests/themes
583638
test_command: cd development-runtime; gatsby-dev --force-install --scan-once; yarn test
584639

585640
themes_e2e_tests_production_runtime:
586-
<<: *e2e-executor
641+
parameters:
642+
node_version:
643+
type: string
644+
e2e_executor_suffix:
645+
type: string
646+
executor: e2e<< parameters.e2e_executor_suffix >>
587647
steps:
588648
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_THEMES_PROD_RUNTIME}"' >> "$BASH_ENV"
589649
- e2e-test:
590650
test_path: e2e-tests/themes
591651
test_command: cd production-runtime; gatsby-dev --force-install --scan-once; yarn test
592652

593653
e2e_tests_mdx:
594-
<<: *e2e-executor
654+
parameters:
655+
node_version:
656+
type: string
657+
e2e_executor_suffix:
658+
type: string
659+
executor: e2e<< parameters.e2e_executor_suffix >>
595660
steps:
596661
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_MDX}"' >> "$BASH_ENV"
597662
- e2e-test:
598663
test_path: e2e-tests/mdx
599664

600665
e2e_tests_visual-regression:
601-
<<: *e2e-executor
666+
parameters:
667+
node_version:
668+
type: string
669+
e2e_executor_suffix:
670+
type: string
671+
executor: e2e<< parameters.e2e_executor_suffix >>
602672
steps:
603673
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_VISUAL_REGRESSION}"' >> "$BASH_ENV"
604674
- e2e-test:
605675
test_path: e2e-tests/visual-regression
606676
- store_artifacts:
607-
path: e2e-tests/visual-regression/__diff_output__
677+
path: e2e-tests/visual-regression/<< parameters.e2e_executor_suffix >>/__diff_output__
608678
- store_test_results:
609-
path: e2e-tests/visual-regression/cypress/results
679+
path: e2e-tests/visual-regression/cypress/<< parameters.e2e_executor_suffix >>/results
610680

611681
e2e_tests_contentful:
612-
<<: *e2e-executor
682+
parameters:
683+
node_version:
684+
type: string
685+
e2e_executor_suffix:
686+
type: string
687+
executor: e2e<< parameters.e2e_executor_suffix >>
613688
steps:
614689
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_CONTENTFUL}"' >> "$BASH_ENV"
615690
- e2e-test:
@@ -619,42 +694,53 @@ jobs:
619694
test_path: e2e-tests/contentful
620695
test_command: yarn build
621696
- store_artifacts:
622-
path: e2e-tests/contentful/__diff_output__
697+
path: e2e-tests/contentful/<< parameters.e2e_executor_suffix >>/__diff_output__
623698
- store_test_results:
624-
path: e2e-tests/contentful/cypress/results
699+
path: e2e-tests/contentful/cypress/<< parameters.e2e_executor_suffix >>/results
625700

626701
e2e_tests_trailing-slash:
627-
<<: *e2e-executor
702+
parameters:
703+
node_version:
704+
type: string
705+
e2e_executor_suffix:
706+
type: string
707+
executor: e2e<< parameters.e2e_executor_suffix >>
628708
steps:
629709
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_TRAILING_SLASH}"' >> "$BASH_ENV"
630710
- e2e-test:
631711
test_path: e2e-tests/trailing-slash
632712
- store_test_results:
633-
path: e2e-tests/trailing-slash/cypress/results
713+
path: e2e-tests/trailing-slash/cypress/<< parameters.e2e_executor_suffix >>/results
634714

635715
e2e_tests_adapters:
636-
<<: *e2e-executor
637-
docker:
638-
- image: cypress/browsers:node-18.20.3-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1
716+
parameters:
717+
node_version:
718+
type: string
719+
e2e_executor_suffix:
720+
type: string
721+
executor: e2e<< parameters.e2e_executor_suffix >>
639722
steps:
640723
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_ADAPTERS}"' >> "$BASH_ENV"
641724
- e2e-test:
642725
test_path: e2e-tests/adapters
643726
- store_test_results:
644-
path: e2e-tests/adapters/cypress/results
727+
path: e2e-tests/adapters/cypress/<< parameters.e2e_executor_suffix >>/results
645728

646729
e2e_tests_adapters_monorepo:
647-
<<: *e2e-executor
648-
docker:
649-
- image: cypress/browsers:node-18.20.3-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1
730+
parameters:
731+
node_version:
732+
type: string
733+
e2e_executor_suffix:
734+
type: string
735+
executor: e2e<< parameters.e2e_executor_suffix >>
650736
steps:
651737
- run: echo 'export CYPRESS_RECORD_KEY="${CY_CLOUD_ADAPTERS}"' >> "$BASH_ENV"
652738
- e2e-test:
653739
test_path: e2e-tests/adapters
654740
test_command: cd workspace; gatsby-dev --force-install --scan-once; cd ..; yarn test
655741
pre_gatsby_dev_command: ./make-monorepo.sh
656742
- store_test_results:
657-
path: e2e-tests/adapters/cypress/results
743+
path: e2e-tests/adapters/cypress/<< parameters.e2e_executor_suffix >>/results
658744

659745
starters_validate:
660746
executor: node

e2e-tests/adapters/package.json

Lines changed: 3 additions & 3 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 / 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 / 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 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",
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",
@@ -40,7 +40,7 @@
4040
"gatsby-cypress": "^3.13.1",
4141
"netlify-cli": "^17.25.0",
4242
"npm-run-all": "^4.1.5",
43-
"start-server-and-test": "^2.0.3",
43+
"start-server-and-test": "2.1.1",
4444
"typescript": "^5.3.3"
4545
}
4646
}

e2e-tests/contentful/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"gatsby-cypress": "next",
2727
"prettier": "^2.8.8",
2828
"srcset": "^5.0.0",
29-
"start-server-and-test": "^2.0.3",
29+
"start-server-and-test": "2.1.1",
3030
"typescript": "^5.3.3"
3131
},
3232
"keywords": [

e2e-tests/development-runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"gatsby-cypress": "next",
7272
"is-ci": "^3.0.1",
7373
"prettier": "^2.8.8",
74-
"start-server-and-test": "^2.0.3",
74+
"start-server-and-test": "2.1.1",
7575
"typescript": "^5.3.3",
7676
"yargs": "^17.7.2"
7777
},

e2e-tests/mdx/package.json

Lines changed: 3 additions & 3 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 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 node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome --e2e --config-file cypress/configs/develop.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",
4343
"reset": "node scripts/reset.js",
4444
"update": "node scripts/update.js"
4545
},
@@ -48,7 +48,7 @@
4848
"gatsby-cypress": "next",
4949
"is-ci": "^3.0.1",
5050
"prettier": "^2.8.8",
51-
"start-server-and-test": "^2.0.3",
51+
"start-server-and-test": "2.1.1",
5252
"typescript": "^5.3.3"
5353
}
5454
}

e2e-tests/path-prefix/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"make-dir-cli": "^3.1.0",
4747
"npm-run-all": "^4.1.5",
4848
"prettier": "^2.8.8",
49-
"start-server-and-test": "^2.0.3",
49+
"start-server-and-test": "2.1.1",
5050
"typescript": "^5.3.3",
5151
"wait-on": "^7.2.0"
5252
},

e2e-tests/production-runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"gatsby-core-utils": "next",
6363
"is-ci": "^3.0.1",
6464
"prettier": "^2.8.8",
65-
"start-server-and-test": "^2.0.3",
65+
"start-server-and-test": "2.1.1",
6666
"typescript": "^5.3.3"
6767
},
6868
"repository": {

0 commit comments

Comments
 (0)