Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: do not build unnecessary build targets in bazel test jobs #18158

Conversation

@devversion
Copy link
Member

devversion commented Jan 12, 2020

Currently in Bazel test jobs we simply use //src/.... This results
in non-test targets which are simply unnecessary (e.g. npm_packages),
being built. Instead, we can specify --build_tests_only to instruct
bazel to only build targets needed for testing.

We verify our build in a separate bazel_build job, so building
unrelated things in every test job is superfluos.

Currently in Bazel test jobs we simply use `//src/...`. This results
in non-test targets which are simply unnecessary (e.g. npm_packages),
being built. Instead, we can specify `--build_tests_only` to instruct
bazel to only build targets needed for testing.

We verify our build in a separate `bazel_build` job, so building
unrelated things in every test job is superfluos.
@googlebot googlebot added the cla: yes label Jan 12, 2020
@devversion devversion marked this pull request as ready for review Jan 12, 2020
@devversion devversion requested a review from angular/dev-infra-components as a code owner Jan 12, 2020
@devversion

This comment has been minimized.

Copy link
Member Author

devversion commented Jan 12, 2020

Note: I think it's okay to repeat this flag where needed. We don't want to add this as the default, as using this flag only makes sense in certain contexts (or in this case: CI jobs)

Copy link
Member

jelbourn left a comment

LGTM

@andrewseguin andrewseguin merged commit 203c8d6 into angular:master Jan 15, 2020
12 checks passed
12 checks passed
ci/angular: merge status All checks passed!
ci/circleci: api_golden_checks Your tests passed on CircleCI!
Details
ci/circleci: bazel_build Your tests passed on CircleCI!
Details
ci/circleci: build_release_packages Your tests passed on CircleCI!
Details
ci/circleci: e2e_tests Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: ngcc_compatibility Your tests passed on CircleCI!
Details
ci/circleci: tests_browserstack Your tests passed on CircleCI!
Details
ci/circleci: tests_local_browsers Your tests passed on CircleCI!
Details
ci/circleci: tests_saucelabs Your tests passed on CircleCI!
Details
ci/circleci: view_engine_test Your tests passed on CircleCI!
Details
cla/google All necessary CLAs are signed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.