|
1 | 1 | language: go
|
2 | 2 | sudo: false
|
3 | 3 | go:
|
4 |
| -- 1.5 |
| 4 | + - 1.5 |
5 | 5 | env:
|
6 |
| - - "GIMME_OS=linux GIMME_ARCH=amd64" |
7 |
| - - "GIMME_OS=darwin GIMME_ARCH=amd64" |
8 |
| - - "GIMME_OS=windows GIMME_ARCH=amd64" |
9 |
| - - "GIMME_OS=windows GIMME_ARCH=386" |
| 6 | + - "MY_GOOS=linux MY_GOARCH=amd64" |
| 7 | + - "MY_GOOS=darwin MY_GOARCH=amd64" |
| 8 | + - "MY_GOOS=windows MY_GOARCH=amd64" |
| 9 | + - "MY_GOOS=windows MY_GOARCH=386" |
10 | 10 | before_install:
|
11 |
| -# workaround for travis-ci/gimme#25 to pick up latest version of gimme and run again |
12 |
| -- curl -o gimme -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme |
13 |
| -- chmod u+x gimme |
14 |
| -- unset GOROOT GOTOOLDIR |
15 |
| -- eval "$(./gimme 1.5)" |
16 |
| -- go version |
17 |
| -- go env |
| 11 | +# workaround for travis-ci/gimme#42 |
| 12 | + - curl -o go.tar.gz -sL https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz |
| 13 | + - tar -C $HOME -xf go.tar.gz |
| 14 | + - rm go.tar.gz |
| 15 | + - export GOROOT="${HOME}/go" |
| 16 | + - export PATH="${GOROOT}/bin:${PATH}" |
| 17 | + - export GOOS="${MY_GOOS}" |
| 18 | + - export GOARCH="${MY_GOARCH}" |
18 | 19 | # end of workaround ###
|
19 |
| -- go get github.com/axw/gocov/gocov |
20 |
| -- go get github.com/mattn/goveralls |
21 |
| -- go get golang.org/x/tools/cmd/cover |
22 |
| -- go get github.com/pierrre/gotestcover |
| 20 | + - go get github.com/axw/gocov/gocov |
| 21 | + - go get github.com/mattn/goveralls |
| 22 | + - go get golang.org/x/tools/cmd/cover |
| 23 | + - go get github.com/pierrre/gotestcover |
23 | 24 | script:
|
24 | 25 | # need to test without gotestcover since error code is not reliable for gotestcover
|
25 |
| -- "test $GIMME_OS.$GIMME_ARCH != linux.amd64 || go test -v ./..." |
| 26 | + - "test $GOOS.$GOARCH != linux.amd64 || go test -v ./..." |
26 | 27 | after_script:
|
27 | 28 | # using gotestcover means tests get run again, but need to do this since exit code of gotestcover is unreliable
|
28 |
| -- "if test $GIMME_OS.$GIMME_ARCH = linux.amd64; ${GOPATH}/bin/gotestcover -v -coverprofile=coverage.report ./...; go tool cover -func=coverage.report; ${HOME}/gopath/bin/goveralls -coverprofile=coverage.report -service=travis-ci; fi" |
| 29 | + - "if test $GOOS.$GOARCH = linux.amd64; ${GOPATH}/bin/gotestcover -v -coverprofile=coverage.report ./...; go tool cover -func=coverage.report; ${HOME}/gopath/bin/goveralls -coverprofile=coverage.report -service=travis-ci; fi" |
29 | 30 | notifications:
|
30 | 31 | irc:
|
31 | 32 | channels:
|
|
0 commit comments