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
This commit is contained in:
Joey Perrott 2020-10-15 08:58:38 -07:00 committed by Andrew Kushnir
parent d8e313bb6d
commit 8fd59dabba
3 changed files with 14 additions and 14 deletions

View File

@ -6,10 +6,6 @@
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics # https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
try-import %workspace%/.circleci/bazel.common.rc 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 # Manually set the local resources used in windows CI runs
build --local_ram_resources=120000 build --local_ram_resources=120000
build --local_cpu_resources=32 build --local_cpu_resources=32

View File

@ -743,19 +743,26 @@ jobs:
steps: steps:
- setup_win - setup_win
- run: - run:
# Ran into a command parsing problem where `-browser:chromium-local` was converted to name: Build all windows CI targets
# `-browser: chromium-local` (a space was added) in https://circleci.com/gh/angular/angular/357511. command: yarn bazel build --build_tag_filters=-ivy-only //packages/compiler-cli/... //tools/ts-api-guardian/...
# Probably a powershell command parsing thing. There's no problem using a yarn script though. no_output_timeout: 15m
command: yarn circleci-win-ve - run:
no_output_timeout: 45m 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: test_ivy_aot_win:
executor: windows-executor executor: windows-executor
steps: steps:
- setup_win - setup_win
- run: - run:
command: yarn circleci-win-ivy name: Build all windows CI targets
no_output_timeout: 45m 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: workflows:

View File

@ -28,9 +28,6 @@
"test-non-ivy": "bazelisk test --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only", "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", "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", "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", "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)\"", "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", "public-api:check": "node goldens/public-api/manage.js test",