Skip to content

Commit ad01dde

Browse files
committed
ci: run integration tests on node 18 and 22
1 parent 7f7c5b9 commit ad01dde

File tree

1 file changed

+124
-17
lines changed

1 file changed

+124
-17
lines changed

.circleci/config.yml

Lines changed: 124 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -233,66 +233,115 @@ jobs:
233233
<<: *test_template
234234

235235
integration_tests_gatsby_source_wordpress:
236+
parameters:
237+
node_version:
238+
type: string
236239
machine:
237240
image: "ubuntu-2204:2023.02.1"
238241
steps:
239242
- run:
240243
command: |
241244
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
242245
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
243-
echo nvm install v18 >> $BASH_ENV
244-
echo nvm alias default v18 >> $BASH_ENV
246+
echo nvm install v<< parameters.node_version >> >> $BASH_ENV
247+
echo nvm alias default v<< parameters.node_version >> >> $BASH_ENV
245248
- run: |
246249
node -v
247250
- run: npm i -g [email protected]
248251
- e2e-test:
249252
test_path: integration-tests/gatsby-source-wordpress
250253

251254
integration_tests_long_term_caching:
252-
executor: node
255+
parameters:
256+
node_version:
257+
type: string
258+
executor:
259+
name: node
260+
image: << parameters.node_version >>
253261
steps:
254262
- e2e-test:
255263
test_path: integration-tests/long-term-caching
264+
test_command: yarn test
256265

257266
integration_tests_cache_resilience:
258-
executor: node
267+
parameters:
268+
node_version:
269+
type: string
270+
executor:
271+
name: node
272+
image: << parameters.node_version >>
259273
steps:
260274
- e2e-test:
261275
test_path: integration-tests/cache-resilience
276+
test_command: yarn test
262277

263278
integration_tests_gatsby_pipeline:
264-
executor: node
279+
parameters:
280+
node_version:
281+
type: string
282+
executor:
283+
name: node
284+
image: << parameters.node_version >>
265285
steps:
266286
- e2e-test:
267287
test_path: integration-tests/gatsby-pipeline
288+
test_command: yarn test
268289

269290
integration_tests_gatsby_cli:
270-
executor: node
291+
parameters:
292+
node_version:
293+
type: string
294+
executor:
295+
name: node
296+
image: << parameters.node_version >>
271297
steps:
272298
- e2e-test:
273299
test_path: integration-tests/gatsby-cli
274-
trigger_pattern: packages/gatsby-cli/*|packages/gatsby/*|integration-tests/gatsby-cli/*|scripts/e2e-test.sh
300+
test_command: yarn test
275301

276302
integration_tests_structured_logging:
277-
executor: node
303+
parameters:
304+
node_version:
305+
type: string
306+
executor:
307+
name: node
308+
image: << parameters.node_version >>
278309
steps:
279310
- e2e-test:
280311
test_path: integration-tests/structured-logging
312+
test_command: yarn test
281313

282314
integration_tests_artifacts:
283-
executor: node
315+
parameters:
316+
node_version:
317+
type: string
318+
executor:
319+
name: node
320+
image: << parameters.node_version >>
284321
steps:
285322
- e2e-test:
286323
test_path: integration-tests/artifacts
324+
test_command: yarn test
287325

288326
integration_tests_ssr:
289-
executor: node
327+
parameters:
328+
node_version:
329+
type: string
330+
executor:
331+
name: node
332+
image: << parameters.node_version >>
290333
steps:
291334
- e2e-test:
292335
test_path: integration-tests/ssr
336+
test_command: yarn test
293337

294338
integration_tests_images:
295-
executor: node
339+
parameters:
340+
node_version:
341+
type: string
342+
executor:
343+
name: node
344+
image: << parameters.node_version >>
296345
steps:
297346
- e2e-test:
298347
test_path: integration-tests/images
@@ -301,28 +350,48 @@ jobs:
301350
path: integration-tests/images/__diff_output__
302351

303352
integration_tests_functions:
304-
executor: node
353+
parameters:
354+
node_version:
355+
type: string
356+
executor:
357+
name: node
358+
image: << parameters.node_version >>
305359
steps:
306360
- e2e-test:
307361
test_path: integration-tests/functions
308362
test_command: yarn test
309363

310364
integration_tests_head_function_export:
311-
executor: node
365+
parameters:
366+
node_version:
367+
type: string
368+
executor:
369+
name: node
370+
image: << parameters.node_version >>
312371
steps:
313372
- e2e-test:
314373
test_path: integration-tests/head-function-export
315374
test_command: yarn test
316375

317376
integration_tests_esm_in_gatsby_files:
318-
executor: node
377+
parameters:
378+
node_version:
379+
type: string
380+
executor:
381+
name: node
382+
image: << parameters.node_version >>
319383
steps:
320384
- e2e-test:
321385
test_path: integration-tests/esm-in-gatsby-files
322386
test_command: yarn test
323387

324388
integration_tests_lmdb_regeneration:
325-
executor: node
389+
parameters:
390+
node_version:
391+
type: string
392+
executor:
393+
name: node
394+
image: << parameters.node_version >>
326395
steps:
327396
- e2e-test:
328397
test_path: integration-tests/lmdb-regeneration
@@ -689,31 +758,69 @@ workflows:
689758
- bootstrap
690759
- integration_tests_gatsby_source_wordpress:
691760
<<: *e2e-test-workflow
761+
matrix:
762+
parameters:
763+
node_version: ["18.2.0", "22.18"]
692764
- integration_tests_long_term_caching:
693765
<<: *e2e-test-workflow
766+
matrix:
767+
parameters:
768+
node_version: ["18.2.0", "22.18"]
694769
- integration_tests_cache_resilience:
695770
<<: *e2e-test-workflow
771+
matrix:
772+
parameters:
773+
node_version: ["18.2.0", "22.18"]
696774
- integration_tests_gatsby_pipeline:
697775
<<: *e2e-test-workflow
776+
matrix:
777+
parameters:
778+
node_version: ["18.2.0", "22.18"]
698779
- integration_tests_structured_logging:
699780
<<: *e2e-test-workflow
781+
matrix:
782+
parameters:
783+
node_version: ["18.2.0", "22.18"]
700784
- integration_tests_artifacts:
701785
<<: *e2e-test-workflow
786+
matrix:
787+
parameters:
788+
node_version: ["18.2.0", "22.18"]
702789
- integration_tests_ssr:
703790
<<: *e2e-test-workflow
791+
matrix:
792+
parameters:
793+
node_version: ["18.2.0", "22.18"]
704794
- integration_tests_images:
705795
<<: *e2e-test-workflow
796+
matrix:
797+
parameters:
798+
node_version: ["18.2.0", "22.18"]
706799
- integration_tests_functions:
707800
<<: *e2e-test-workflow
801+
matrix:
802+
parameters:
803+
node_version: ["18.2.0", "22.18"]
708804
- integration_tests_head_function_export:
709805
<<: *e2e-test-workflow
806+
matrix:
807+
parameters:
808+
node_version: ["18.2.0", "22.18"]
710809
- integration_tests_esm_in_gatsby_files:
711810
<<: *e2e-test-workflow
811+
matrix:
812+
parameters:
813+
node_version: ["18.2.0", "22.18"]
712814
- integration_tests_lmdb_regeneration:
713815
<<: *e2e-test-workflow
816+
matrix:
817+
parameters:
818+
node_version: ["18.2.0", "22.18"]
714819
- integration_tests_gatsby_cli:
715-
requires:
716-
- bootstrap
820+
<<: *e2e-test-workflow
821+
matrix:
822+
parameters:
823+
node_version: ["18.2.0", "22.18"]
717824
- e2e_tests_pnp:
718825
<<: *e2e-test-workflow
719826
- e2e_tests_pnpm:

0 commit comments

Comments
 (0)