diff --git a/SHA256SUMS b/SHA256SUMS index 6e3d27e..5bff3d2 100644 --- a/SHA256SUMS +++ b/SHA256SUMS @@ -1,2 +1,2 @@ 05e4977d541b2ef07c757acca912b7b58b379fb425eceb3a1f53c829a78a4aa4 docker2aci.sh -fcf00a177d53ec3b60d20e99849727dcf66136902e776cdde6c6c4a72cea81f5 golang.sh +b93ca8d05cc16d59d5ae117cbb389a82e505bb1f1b46f454ae8aac73bd4ffade golang.sh diff --git a/golang.sh b/golang.sh index 0f708a4..675a5bd 100755 --- a/golang.sh +++ b/golang.sh @@ -29,6 +29,7 @@ BUILD_DIR=${BUILD_DIR:-.build} DRAFT=${DRAFT:-true} FORCE_SKIP_UPLOAD=${FORCE_SKIP_UPLOAD:-false} MOD_MODE=${MOD_MODE:-} +NO_TESTS=${NO_TESTS:-false} go version @@ -38,16 +39,18 @@ pushd "${GOPATH}/src/github.com/Luzifer/github-release" GO111MODULE=on go install popd -step "Test code" -go_params=() +if [[ $NO_TESTS == false ]]; then + step "Test code" + go_params=() -if [[ -n ${MOD_MODE} ]]; then - go_params+=(-mod="${MOD_MODE}") + if [[ -n ${MOD_MODE} ]]; then + go_params+=(-mod="${MOD_MODE}") + fi + + go vet "${go_params[@]}" ${PACKAGES} + go test "${go_params[@]}" ${PACKAGES} fi -go vet "${go_params[@]}" ${PACKAGES} -go test "${go_params[@]}" ${PACKAGES} - step "Cleanup build directory if present" rm -rf ${BUILD_DIR}