github.com/outcaste-io/ristretto@v0.2.3/test.sh (about) 1 #! /bin/sh 2 3 starttest() { 4 set -e 5 GO111MODULE=on go test -race ./... 6 } 7 8 if [ -z "${TEAMCITY_VERSION}" ]; then 9 # running locally, so start test in a container 10 # TEAMCITY_VERSION=local will avoid recursive calls, when it would be running in container 11 docker run --rm --name ristretto-test -ti \ 12 -v `pwd`:/go/src/github.com/outcaste-io/ristretto \ 13 --workdir /go/src/github.com/outcaste-io/ristretto \ 14 --env TEAMCITY_VERSION=local \ 15 golang:1.16 \ 16 sh test.sh 17 else 18 # running in teamcity, since teamcity itself run this in container, let's simply run this 19 starttest 20 fi