From b5ec5a7fcae68f03823238aeed7e4a7ead38962b Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 15 Oct 2020 08:58:38 -0700 Subject: [PATCH] ci: separate the windows CI tests into build and test (#39289) Because the compiler-cli tests modify node_modules, this can cause failures on windows CI specifically as node_modules are symlinked to rather than copied. By running the test and build actions in separate commands, all of the tests are built to be executed before and tests are executed and modify the node_modules content. PR Close #39289 --- .circleci/bazel.windows.rc | 4 ---- .circleci/config.yml | 21 ++++++++++++++------- package.json | 3 --- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.circleci/bazel.windows.rc b/.circleci/bazel.windows.rc index 4e2378b43c..309b1cba13 100644 --- a/.circleci/bazel.windows.rc +++ b/.circleci/bazel.windows.rc @@ -6,10 +6,6 @@ # https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics try-import %workspace%/.circleci/bazel.common.rc -# Save downloaded repositories in a location that can be cached by CircleCI. This helps us -# speeding up the analysis time significantly with Bazel managed node dependencies on the CI. -build --repository_cache=C:/Users/circleci/bazel_repository_cache - # Manually set the local resources used in windows CI runs build --local_ram_resources=120000 build --local_cpu_resources=32 diff --git a/.circleci/config.yml b/.circleci/config.yml index 6189b6436b..24b56f788d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -748,19 +748,26 @@ jobs: steps: - setup_win - run: - # Ran into a command parsing problem where `-browser:chromium-local` was converted to - # `-browser: chromium-local` (a space was added) in https://circleci.com/gh/angular/angular/357511. - # Probably a powershell command parsing thing. There's no problem using a yarn script though. - command: yarn circleci-win-ve - no_output_timeout: 45m + name: Build all windows CI targets + command: yarn bazel build --build_tag_filters=-ivy-only //packages/compiler-cli/... //tools/ts-api-guardian/... + no_output_timeout: 15m + - run: + name: Test all windows CI targets + command: yarn bazel test --test_tag_filters="-ivy-only,-browser:chromium-local" //packages/compiler-cli/... //tools/ts-api-guardian/... + no_output_timeout: 15m test_ivy_aot_win: executor: windows-executor steps: - setup_win - run: - command: yarn circleci-win-ivy - no_output_timeout: 45m + name: Build all windows CI targets + command: yarn bazel build --config=ivy --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot //packages/compiler-cli/... //tools/ts-api-guardian/... + no_output_timeout: 15m + - run: + name: Test all windows CI targets + command: yarn bazel test --config=ivy --test_tag_filters="-no-ivy-aot,-fixme-ivy-aot,-browser:chromium-local" //packages/compiler-cli/... //tools/ts-api-guardian/... + no_output_timeout: 15m workflows: diff --git a/package.json b/package.json index 8e321433a0..493d416792 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,6 @@ "test-non-ivy": "bazelisk test --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only", "test-fixme-ivy-aot": "bazelisk test --config=ivy --build_tag_filters=-no-ivy-aot --test_tag_filters=-no-ivy-aot", "list-fixme-ivy-targets": "bazelisk query --output=label 'attr(\"tags\", \"\\[.*fixme-ivy.*\\]\", //...) except kind(\"sh_binary\", //...) except kind(\"devmode_js_sources\", //...)' | sort", - "//circleci-win-comment": "See the test-win circleci job for why these are needed. If they are not needed anymore, remove them.", - "circleci-win-ve": "bazelisk test --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only,-browser:chromium-local //packages/compiler-cli/... //tools/ts-api-guardian/...", - "circleci-win-ivy": "bazelisk test --config=ivy --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot,-browser:chromium-local //packages/compiler-cli/... //tools/ts-api-guardian/...", "lint": "yarn -s tslint && yarn -s ng-dev format changed --check", "tslint": "tsc -p tools/tsconfig.json && tslint -c tslint.json \"+(dev-infra|packages|modules|scripts|tools)/**/*.+(js|ts)\"", "public-api:check": "node goldens/public-api/manage.js test",