@@ -25,6 +25,10 @@ parameters:
2525var_1 : &cache_key v1-angular_devkit-14.19-{{ checksum "yarn.lock" }}
2626var_1_win : &cache_key_win v1-angular_devkit-win-16.10-{{ checksum "yarn.lock" }}
2727var_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']
2832# Workspace initially persisted by the `setup` job, and then enhanced by `setup-and-build-win`.
2933# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
3034# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
@@ -291,19 +295,39 @@ jobs:
291295 - custom_attach_workspace
292296 - run : yarn bazel build //tests/legacy-cli/...
293297
294- test :
298+ unit- test :
295299 executor : test-executor
296300 resource_class : xlarge
301+ parameters :
302+ nodeversion :
303+ type : string
304+ default : *default_nodeversion_major
297305 steps :
298306 - custom_attach_workspace
299307 - browser-tools/install-chrome
300308 - setup_bazel_rbe
301309 - 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
307331 - fail_fast
308332
309333 snapshot_publish :
@@ -429,7 +453,11 @@ workflows:
429453 # These jobs only really depend on Setup, but the build job is very quick to run (~35s) and
430454 # will catch any build errors before proceeding to the more lengthy and resource intensive
431455 # Bazel jobs.
432- - test :
456+ - unit-test :
457+ name : test-node<< matrix.nodeversion >>
458+ matrix :
459+ parameters :
460+ nodeversion : *all_nodeversion_major
433461 requires :
434462 - build
435463
0 commit comments