From 6d57cb04f69bb8ef8f5de9ce77044d86dc366b50 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Wed, 13 Dec 2017 09:18:16 -0800 Subject: [PATCH] ci: parallelize bazel build and test The current setup can cause a de-optimization where unit tests can't start running until the slowest build target completes. --- .circleci/config.yml | 8 ++++++-- tools/bazel.rc | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ec936f9b71..af26aafa67 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,10 +52,14 @@ jobs: <<: *post_checkout - restore_cache: key: *cache_key + - run: bazel info release - run: bazel run @yarn//:yarn - - run: bazel build --config=ci packages/... - - run: bazel test --config=ci packages/... @angular//... + # Use bazel query so that we explicitly ask for all buildable targets to be built as well + # This avoids waiting for a build command to finish before running the first test + # See https://github.com/bazelbuild/bazel/issues/4257 + - run: bazel query --output=label '//packages/... union @angular//...' | xargs bazel test --config=ci + - save_cache: key: *cache_key paths: diff --git a/tools/bazel.rc b/tools/bazel.rc index 0b7ed2193c..edb146aa0c 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -47,3 +47,6 @@ test --experimental_ui # Don't be spammy in the continuous integration logs build:ci --noshow_progress + +# Don't run manual tests on CI +test:ci --test_tag_filters=-manual