@@ -25,6 +25,10 @@ parameters:
25
25
var_1 : &cache_key v1-angular_devkit-14.19-{{ checksum "yarn.lock" }}
26
26
var_1_win : &cache_key_win v1-angular_devkit-win-16.10-{{ checksum "yarn.lock" }}
27
27
var_3 : &default_nodeversion '14.19'
28
+ var_3_major : &default_nodeversion_major '14'
29
+ # The major version of node toolchains. See tools/toolchain_info.bzl
30
+ # NOTE: entries in this array may be repeated elsewhere in the file, find them before adding more
31
+ var_3_all_major : &all_nodeversion_major ['14', '16']
28
32
# Workspace initially persisted by the `setup` job, and then enhanced by `setup-and-build-win`.
29
33
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
30
34
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
@@ -291,19 +295,39 @@ jobs:
291
295
- custom_attach_workspace
292
296
- run : yarn bazel build //tests/legacy-cli/...
293
297
294
- test :
298
+ unit- test :
295
299
executor : test-executor
296
300
resource_class : xlarge
301
+ parameters :
302
+ nodeversion :
303
+ type : string
304
+ default : *default_nodeversion_major
297
305
steps :
298
306
- custom_attach_workspace
299
307
- browser-tools/install-chrome
300
308
- setup_bazel_rbe
301
309
- run : sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
302
- - run :
303
- command : yarn bazel:test
304
- # This timeout provides time for the actual tests to timeout and report status
305
- # instead of CircleCI stopping the job without test failure information.
306
- no_output_timeout : 40m
310
+ - when :
311
+ # The default nodeversion runs all *excluding* other versions
312
+ condition :
313
+ equal : [*default_nodeversion_major, << parameters.nodeversion >>]
314
+ steps :
315
+ - run :
316
+ command : yarn bazel test --test_tag_filters=-node16,-node<< parameters.nodeversion >>-broken //packages/...
317
+ # This timeout provides time for the actual tests to timeout and report status
318
+ # instead of CircleCI stopping the job without test failure information.
319
+ no_output_timeout : 40m
320
+ - when :
321
+ # Non-default nodeversion runs only that specific nodeversion
322
+ condition :
323
+ not :
324
+ equal : [*default_nodeversion_major, << parameters.nodeversion >>]
325
+ steps :
326
+ - run :
327
+ command : yarn bazel test --test_tag_filters=node<< parameters.nodeversion >>,-node<< parameters.nodeversion >>-broken //packages/...
328
+ # This timeout provides time for the actual tests to timeout and report status
329
+ # instead of CircleCI stopping the job without test failure information.
330
+ no_output_timeout : 40m
307
331
- fail_fast
308
332
309
333
snapshot_publish :
@@ -429,7 +453,11 @@ workflows:
429
453
# These jobs only really depend on Setup, but the build job is very quick to run (~35s) and
430
454
# will catch any build errors before proceeding to the more lengthy and resource intensive
431
455
# Bazel jobs.
432
- - test :
456
+ - unit-test :
457
+ name : test-node<< matrix.nodeversion >>
458
+ matrix :
459
+ parameters :
460
+ nodeversion : *all_nodeversion_major
433
461
requires :
434
462
- build
435
463
0 commit comments