-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
29 lines (24 loc) · 940 Bytes
/
.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
language: go
os:
- linux
- osx
go:
- tip
before_install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- go get golang.org/x/tools/cmd/goimports
- go get github.com/golang/lint/golint
- go get github.com/stretchr/testify/assert
- go get github.com/gordonklaus/ineffassign
install: go get -t -v $(go list ./... | grep -v /internal/)
script:
- go version
- go env
- gofiles=$(find ./ -name '*.go' | grep -v generated) && [ -z "$gofiles" ] || unformatted=$(goimports -l $gofiles) && [ -z "$unformatted" ] || (echo >&2 "Go files must be formatted with gofmt. Following files has problem:\n $unformatted" && false)
- diff <(echo -n) <(gofmt -s -d .)
- golint ./... # This won't break the build, just show warnings
- ineffassign .
- go vet ./...
- go test -v -coverprofile=main.coverprofile ./cli
- $HOME/gopath/bin/goveralls -coverprofile=main.coverprofile -service travis-ci