From 60dc590970f12b404a37bafd20eefbb828d038e5 Mon Sep 17 00:00:00 2001 From: Brenna N Epp Date: Thu, 23 Dec 2021 13:22:52 -0600 Subject: [PATCH] ci(storage): run emulator tests only on lastest go version (#5252) --- storage/emulator_test.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/storage/emulator_test.sh b/storage/emulator_test.sh index a97b504f08d..afdf4bfeef4 100755 --- a/storage/emulator_test.sh +++ b/storage/emulator_test.sh @@ -19,6 +19,16 @@ set -eo pipefail # Display commands being run set -x +# Only run on the latest +min_ver=1.17 + +v=`go version | { read _ _ v _; echo ${v#go}; }` +v=${v%.*} + +if (( $(echo "$v < $min_ver" |bc -l) )); then + exit 0 +fi + export STORAGE_EMULATOR_HOST="http://localhost:9000" DEFAULT_IMAGE_NAME='gcr.io/cloud-devrel-public-resources/storage-testbench'