Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Commit

Permalink
Fix problems with travis-ci/gimme#42 and travis-ci/gimme#25
Browse files Browse the repository at this point in the history
  • Loading branch information
petemoore committed Aug 1, 2016
1 parent 2e0a7c9 commit 650fabf
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,23 @@ go:
- 1.6

env:
- "GIMME_OS=linux GIMME_ARCH=amd64"
- "GIMME_OS=darwin GIMME_ARCH=amd64"
- "GIMME_OS=windows GIMME_ARCH=amd64"
- "GIMME_OS=windows GIMME_ARCH=386"

before_install:
# workaround for travis-ci/gimme#25 to pick up latest version of gimme and run again
- curl -o gimme -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
- chmod u+x gimme
- unset GOROOT GOTOOLDIR
- eval "$(./gimme 1.6)"
- rm gimme
- go version
- go env
# end of workaround ###
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- go get github.com/pierrre/gotestcover
- "MY_GOOS=linux MY_GOARCH=amd64"
- "MY_GOOS=darwin MY_GOARCH=amd64"
- "MY_GOOS=windows MY_GOARCH=amd64"
- "MY_GOOS=windows MY_GOARCH=386"

install:
- "echo No go get steps since we have vendored packages..."

script:
- export GOOS="${MY_GOOS}"
- export GOARCH="${MY_GOARCH}"
# note - below, || is used rather than && to ensure we only get zero exit code if all is ok
- "test $GIMME_OS.$GIMME_ARCH == linux.amd64 || make build"
- "test $GIMME_OS.$GIMME_ARCH != linux.amd64 || (make rebuild check && ${GOPATH}/bin/gotestcover -v -coverprofile=coverage.report $(go list ./... | grep -v /vendor/) && go tool cover -func=coverage.report)"
- "test $GOOS.$GOARCH == linux.amd64 || make build"
- "test $GOOS.$GOARCH != linux.amd64 || (go get github.com/axw/gocov/gocov github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/pierrre/gotestcover && make rebuild check && ${GOPATH}/bin/gotestcover -v -coverprofile=coverage.report $(go list ./... | grep -v /vendor/) && go tool cover -func=coverage.report)"

after_script:
- "if test $GIMME_OS.$GIMME_ARCH = linux.amd64; then $HOME/gopath/bin/goveralls -coverprofile=coverage.report -service=travis-ci; fi"
- "if test $GOOS.$GOARCH = linux.amd64; then $HOME/gopath/bin/goveralls -coverprofile=coverage.report -service=travis-ci; fi"

before_deploy:
- "source .travis_rename_releases.sh"
Expand Down

0 comments on commit 650fabf

Please sign in to comment.