@@ -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/
@@ -287,19 +291,39 @@ jobs:
287
291
- custom_attach_workspace
288
292
- run : yarn bazel build //tests/legacy-cli/...
289
293
290
- test :
294
+ unit- test :
291
295
executor : test-executor
292
296
resource_class : xlarge
297
+ parameters :
298
+ nodeversion :
299
+ type : string
300
+ default : *default_nodeversion_major
293
301
steps :
294
302
- custom_attach_workspace
295
303
- browser-tools/install-chrome
296
304
- setup_bazel_rbe
297
305
- run : sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
298
- - run :
299
- command : yarn bazel:test
300
- # This timeout provides time for the actual tests to timeout and report status
301
- # instead of CircleCI stopping the job without test failure information.
302
- no_output_timeout : 40m
306
+ - when :
307
+ # The default nodeversion runs all *excluding* other versions
308
+ condition :
309
+ equal : [*default_nodeversion_major, << parameters.nodeversion >>]
310
+ steps :
311
+ - run :
312
+ command : yarn bazel test --test_tag_filters=-node16,-node<< parameters.nodeversion >>-broken //packages/...
313
+ # This timeout provides time for the actual tests to timeout and report status
314
+ # instead of CircleCI stopping the job without test failure information.
315
+ no_output_timeout : 40m
316
+ - when :
317
+ # Non-default nodeversion runs only that specific nodeversion
318
+ condition :
319
+ not :
320
+ equal : [*default_nodeversion_major, << parameters.nodeversion >>]
321
+ steps :
322
+ - run :
323
+ command : yarn bazel test --test_tag_filters=node<< parameters.nodeversion >>,-node<< parameters.nodeversion >>-broken //packages/...
324
+ # This timeout provides time for the actual tests to timeout and report status
325
+ # instead of CircleCI stopping the job without test failure information.
326
+ no_output_timeout : 40m
303
327
- fail_fast
304
328
305
329
snapshot_publish :
@@ -446,7 +470,11 @@ workflows:
446
470
# These jobs only really depend on Setup, but the build job is very quick to run (~35s) and
447
471
# will catch any build errors before proceeding to the more lengthy and resource intensive
448
472
# Bazel jobs.
449
- - test :
473
+ - unit-test :
474
+ name : test-node<< matrix.nodeversion >>
475
+ matrix :
476
+ parameters :
477
+ nodeversion : *all_nodeversion_major
450
478
requires :
451
479
- build
452
480
0 commit comments