-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathci.sh
More file actions
executable file
·36 lines (26 loc) · 759 Bytes
/
Copy pathci.sh
File metadata and controls
executable file
·36 lines (26 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -euo pipefail
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
# helper to make github actions output pretty
run_group() {
local name="$1"
shift
echo "::group::$name"
printf "\n\n====== $name ======\n\n\n"
if "$@"; then
echo "::endgroup::"
else
local status=$?
echo "::endgroup::"
return "$status"
fi
}
run_group "build and test" \
bazel test --config ci //...
run_group "test gazelle invariance" \
bazel run //:gazelle -- --mode=diff --strict
cd example
run_group "build and test for ./example directory" \
bazel test //...
run_group "test gazelle invariance for ./example directory" \
bazel run //:gazelle -- --mode=diff --strict