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

Commit cd24fe5

Browse files
committed
ci: fail build if Java 8 is not specified for junit-java8
1 parent 636c5e5 commit cd24fe5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.kokoro/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ fi
4646

4747
echo "Running tests using Java:"
4848
java -version
49+
50+
if [ "${GITHUB_JOB}" == "units-java8" ]; then
51+
java -version 2>&1 | grep -q 'openjdk version "1.8.'
52+
MATCH=$? # 0 if the output has the match
53+
if [ "$MATCH" != "0" ]; then
54+
echo "Please specify JDK 8 for Java 8 tests"
55+
exit 1
56+
fi
57+
fi
58+
4959
echo
5060
./gradlew build publishToMavenLocal \
5161
--exclude-task compileJava --exclude-task compileTestJava \

0 commit comments

Comments
 (0)