@@ -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/
@@ -287,19 +291,39 @@ jobs:
287291 - custom_attach_workspace
288292 - run : yarn bazel build //tests/legacy-cli/...
289293
290- test :
294+ unit- test :
291295 executor : test-executor
292296 resource_class : xlarge
297+ parameters :
298+ nodeversion :
299+ type : string
300+ default : *default_nodeversion_major
293301 steps :
294302 - custom_attach_workspace
295303 - browser-tools/install-chrome
296304 - setup_bazel_rbe
297305 - 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
303327 - fail_fast
304328
305329 snapshot_publish :
@@ -446,7 +470,11 @@ workflows:
446470 # These jobs only really depend on Setup, but the build job is very quick to run (~35s) and
447471 # will catch any build errors before proceeding to the more lengthy and resource intensive
448472 # Bazel jobs.
449- - test :
473+ - unit-test :
474+ name : test-node<< matrix.nodeversion >>
475+ matrix :
476+ parameters :
477+ nodeversion : *all_nodeversion_major
450478 requires :
451479 - build
452480
0 commit comments