Skip to content

Commit 61e783c

Browse files
dgp1130angular-robot[bot]
authored andcommitted
ci: update CI .bazelrc to better support CI systems.
A number of small changes with comments here. The main one is that removing `--noshow_progress` will make Bazel print progress updates which tells Circle CI that test execution is still ongoing and avoids test failures due to lack of output. The other notable trade-offs being made here are: 1. [`--keep_going`](https://bazel.build/docs/user-manual#keep-going) means `bazel test` will run all tests report all failures, which could be slower and noisier than reporting just the first failure but is more complete. 2. [`--build_tests_only`](https://bazel.build/docs/user-manual#build-tests-only) means only tests and binaries will be built, so any library targets not tested could have build errors hidden. Any such important targets should either be tested or use Skylib's `build_test()`. The UI options mostly came from [this talk](https://www.youtube.com/watch?v=j332WfhNAFg).
1 parent f50234f commit 61e783c

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.circleci/bazel.common.rc

+16-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
# Echo all the configuration settings and their source
55
build --announce_rc
66

7-
# Don't be spammy in the logs
8-
build --noshow_progress
7+
# Print extra information for build failures to help with debugging.
8+
build --verbose_failures
9+
10+
# Show progress so CI doesn't appear to be stuck, but rate limit to avoid
11+
# spamming the log.
12+
build --show_progress_rate_limit 5
13+
14+
# Improve the UI for rendering to a CI log.
15+
build --curses yes --color yes --terminal_columns 140 --show_timestamps
916

1017
# Workaround https://github.com/bazelbuild/bazel/issues/3645
1118
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
@@ -19,3 +26,10 @@ build --verbose_failures=true
1926

2027
# Retry in the event of flakes
2128
test --flaky_test_attempts=2
29+
30+
# Run as many tests as possible so we capture all the failures.
31+
test --keep_going
32+
33+
# Don't build targets not needed for tests. `build_test()` should be used if a
34+
# target should be verified as buildable on CI.
35+
test --build_tests_only

0 commit comments

Comments
 (0)