forked from cloudfoundry-attic/lattice-release
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
44 lines (39 loc) · 1.2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
branches:
only:
- develop
- master
- /^hw-issue-.*$/
- /^hwcf-issue-.*$/
language: go
go:
- 1.2
- 1.3
- 1.4
- tip
matrix:
allow_failures:
- go: 1.2
- go: 1.3
- go: tip
before_install:
- 'if [[ "${TRAVIS_GO_VERSION}" =~ 1.[2-3] ]]; then go get code.google.com/p/go.tools/cmd/cover; else go get golang.org/x/tools/cmd/cover; fi'
- go get -v github.com/tools/godep
- go get -v github.com/onsi/ginkgo/ginkgo
- go get -v github.com/mattn/goveralls
- repo=`basename $PWD`; localDir=`dirname $PWD`; cfDir="`dirname $localDir`/cloudfoundry-incubator"
- if [[ "$localDir" != "$cfDir" ]]; then mv "$localDir" "$cfDir"; cd ../../cloudfoundry-incubator/$repo; export TRAVIS_BUILD_DIR=`dirname $TRAVIS_BUILD_DIR`/$repo; fi
after_success:
- pushd ltc
- 'echo "mode: set" > coverage.out'
- 'find . -name "*.coverprofile" -exec grep -v mode: {} >> coverage.out \;'
- PATH=$HOME/gopath/bin:$PATH goveralls -coverprofile=coverage.out -repotoken=$COVERALLS_TOKEN
- popd
install:
- pushd ltc
- PATH=$HOME/gopath/bin:$PATH godep restore
- popd
script:
- pushd ltc
- PATH=$HOME/gopath/bin:$PATH ginkgo -r --race --randomizeAllSpecs --failOnPending --skipMeasurements --cover
- test -z "$(go fmt ./...)"
- popd