Skip to content

Commit 508278e

Browse files
build all tests in PRs, even main-only ones
1 parent afd5360 commit 508278e

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

sdk/build.sh

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,6 @@ has_regenerate_stackage_trailer() {
3939
}
4040

4141
tag_filter=""
42-
case $test_mode in
43-
main)
44-
echo "running all tests because test mode is 'main'"
45-
;;
46-
# When running against a PR, exclude "main-only" tests, unless the commit message features a
47-
# 'run-all-tests: true' trailer
48-
pr)
49-
if has_run_all_tests_trailer; then
50-
echo "ignoring 'pr' test mode because the commit message features 'run-all-tests: true'"
51-
else
52-
echo "running fewer tests because test mode is 'pr'"
53-
tag_filter="-main-only"
54-
fi
55-
;;
56-
*)
57-
echo "unknown test mode: $test_mode"
58-
exit 1
59-
;;
60-
esac
6142

6243
if [[ "$(uname)" == "Darwin" ]]; then
6344
tag_filter="$tag_filter,-dont-run-on-darwin,-scaladoc,-pdfdocs"
@@ -161,6 +142,26 @@ start_postgresql
161142

162143
# Run the tests.
163144

145+
case $test_mode in
146+
main)
147+
echo "running all tests because test mode is 'main'"
148+
;;
149+
# When running against a PR, exclude "main-only" tests, unless the commit message features a
150+
# 'run-all-tests: true' trailer
151+
pr)
152+
if has_run_all_tests_trailer; then
153+
echo "ignoring 'pr' test mode because the commit message features 'run-all-tests: true'"
154+
else
155+
echo "running fewer tests because test mode is 'pr'"
156+
tag_filter="$tag_filter,-main-only"
157+
fi
158+
;;
159+
*)
160+
echo "unknown test mode: $test_mode"
161+
exit 1
162+
;;
163+
esac
164+
164165
echo "Running bazel test with the following tag filters: ${tag_filter}"
165166

166167
$bazel test //... \

0 commit comments

Comments
 (0)