Skip to content

Commit 9e26a98

Browse files
authored
Enforce formatting on buildkite (#293)
1 parent 38af982 commit 9e26a98

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

docker/buildkite/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ services:
4343
build:
4444
context: ../../
4545
dockerfile: ./docker/buildkite/Dockerfile
46-
command: "./gradlew --no-daemon test"
46+
command: /bin/sh -c "docker/buildkite/run-tests.sh"
4747
environment:
4848
- "USER=unittest"
4949
- "TEMPORAL_SERVICE_ADDRESS=temporal:7233"
@@ -57,7 +57,7 @@ services:
5757
build:
5858
context: ../../
5959
dockerfile: ./docker/buildkite/Dockerfile
60-
command: "./gradlew --no-daemon test"
60+
command: /bin/sh -c "docker/buildkite/run-tests.sh"
6161
environment:
6262
- "USER=unittest"
6363
- "USE_DOCKER_SERVICE=false"

docker/buildkite/run-tests.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env sh
2+
set -eou pipefail
3+
set -x
4+
5+
./gradlew --no-daemon test
6+
7+
if [ ! -z "$(git status --porcelain)" ]; then
8+
echo 'Some files were improperly formatted. Please run build locally and check in all changes.'
9+
git status;
10+
exit 1;
11+
fi
12+

0 commit comments

Comments
 (0)