diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2014-11-16 07:45:08 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2014-11-16 07:45:08 +0800 |
commit | 6f7f570670bda25a489c94fbd75ca7b763aad65e (patch) | |
tree | b8dc7f6bbd9d966fd273fa7faa5351325d97cf0a /travis.sh | |
parent | 8f9a354682e3c52fda1d2d0d2dd04ab7981e5466 (diff) | |
download | go-tangerine-6f7f570670bda25a489c94fbd75ca7b763aad65e.tar.gz go-tangerine-6f7f570670bda25a489c94fbd75ca7b763aad65e.tar.zst go-tangerine-6f7f570670bda25a489c94fbd75ca7b763aad65e.zip |
custom travis build script
Based on https://github.com/daaku/go.travis/blob/master/install
Diffstat (limited to 'travis.sh')
-rw-r--r-- | travis.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/travis.sh b/travis.sh new file mode 100644 index 000000000..3804761f7 --- /dev/null +++ b/travis.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e +REPO_DIR=$PWD +GITHUB_REPO=$(basename $PWD) +GITHUB_USER=$(basename $(cd .. && pwd)) +export GOPATH=/tmp/$GITHUB_USER/$GITHUB_REPO.$PPID + +mkdir -p $GOPATH/src/github.com/$GITHUB_USER +cp -r $REPO_DIR $GOPATH/src/github.com/$GITHUB_USER/$GITHUB_REPO +echo Fetching package dependicies +go get -race github.com/$GITHUB_USER/$GITHUB_REPO/... +echo Fetching test dependicies +TEST_DEPS=$(go list -f '{{.TestImports}} {{.XTestImports}}' github.com/$GITHUB_USER/$GITHUB_REPO/... | sed -e 's/\[//g' | sed -e 's/\]//g') +if [ "$TEST_DEPS" ]; then + go get -race $TEST_DEPS +fi +# echo Building test dependicies +# go test -race -i github.com/$GITHUB_USER/$GITHUB_REPO/... +# echo Running tests +# go test -race -cpu=1,2,4 -v github.com/$GITHUB_USER/$GITHUB_REPO/... |