From 0b36a9eb2689f032c093286f288dca0688bbb116 Mon Sep 17 00:00:00 2001 From: Nan Liu Date: Fri, 20 Jan 2017 10:56:53 -0800 Subject: [PATCH] Fix travis.ci glide path * only run go_fmt, go_imports for small test to speed up ci. * specify GLIDE_HOME, so .glide/cache does not pollute source code. * add glide --version for debugging. --- .travis.yml | 1 + scripts/deps.sh | 1 + scripts/test.sh | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e5ec04ebf..9c9094785 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ env: global: - SNAP_SOURCE=/home/travis/gopath/src/github.com/intelsdi-x/snap - GO15VENDOREXPERIMENT=1 + - GLIDE_HOME="${HOME}/.glide" matrix: - SNAP_TEST_TYPE=legacy - SNAP_TEST_TYPE=small diff --git a/scripts/deps.sh b/scripts/deps.sh index 6d192ae28..40645885d 100755 --- a/scripts/deps.sh +++ b/scripts/deps.sh @@ -31,5 +31,6 @@ _go_path _go_get github.com/Masterminds/glide +_debug "$(glide --version)" _info "restoring dependency with glide" (cd "${__proj_dir}" && glide install) diff --git a/scripts/test.sh b/scripts/test.sh index 0d56efff3..416479353 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -20,7 +20,11 @@ # Support travis.ci environment matrix: SNAP_TEST_TYPE="${SNAP_TEST_TYPE:-$1}" -UNIT_TEST="${UNIT_TEST:-"gofmt goimports go_test go_cover"}" +if [[ "${SNAP_TEST_TYPE}" == small ]]; then + UNIT_TEST="${UNIT_TEST:-"gofmt goimports go_test go_cover"}" +else + UNIT_TEST="${UNIT_TEST:-"go_test go_cover"}" +fi set -e set -u