Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 8b20e83

Browse files
g-easyIan Sturdy
authored andcommitted
ci.sh: return success when no tests are affected even though builds are. (#56)
e.g. When the affected tests are tagged "noci"
1 parent 54cacd7 commit 8b20e83

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tools/ci.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ if [[ -z "${files}" ]]; then
4444
fi
4545
4646
exit_code=0
47-
trap "exit_code=1" ERR
4847
4948
# We can't use --noshow_progress on build/test commands because Travis
5049
# terminates the build after 10 mins without output.
@@ -55,11 +54,10 @@ if [[ ! -z $buildables ]]; then
5554
echo ""
5655
echo "Building targets:"
5756
echo "$buildables"
58-
bazel build --experimental_ui_actions_shown=1 -k $buildables
57+
bazel build --experimental_ui_actions_shown=1 -k $buildables || exit_code=1
5958
fi
6059
61-
# Exclude tests tagged "noci". Tests marked "manual" are already excluded from
62-
# wildcard queries.
60+
# Exclude tests tagged "noci".
6361
tests=$(bazel query -k --noshow_progress \
6462
"kind(test, rdeps(//..., set(${files[*]}))) \
6563
except attr('tags', 'noci', //...) \
@@ -69,7 +67,7 @@ if [[ ! -z $tests ]]; then
6967
echo ""
7068
echo "Running tests:"
7169
echo "$tests"
72-
bazel test --experimental_ui_actions_shown=1 -k $tests
70+
bazel test --experimental_ui_actions_shown=1 -k $tests || exit_code=1
7371
fi
7472
7573
exit $exit_code

0 commit comments

Comments
 (0)