forked from wuman/firego
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
45 lines (38 loc) · 1.1 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
45
language: go
go:
- 1.5
- 1.6
- tip
matrix:
allow_failures:
- go: tip
fast_finish: true
before_install:
# linting tools
- go get github.com/golang/lint/golint
- go get github.com/fzipp/gocyclo
# code coverage
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
install:
# make sure stuff actually builds
- go build
script:
# ensure everything is formatted all pretty like
- if gofmt -l -s . | grep '**.go'; then exit 1; fi
# vet out possible issues
- go vet ./...
# run tests
- go get -t
- $HOME/gopath/bin/goveralls -service=travis-ci -repotoken=$COVERALLS -v
after_script:
# check possible styling errors
- golint ./...
# check for potentially complex functions but don't false build
- gocyclo -over 15 . || true
# refresh godocs in case there were api changes
- |
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$TRAVIS_BRANCH" == "master" ]]; then
go list ./... | xargs -n 1 -I{} curl http://godoc.org/-/refresh -d path={}
fi