-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
24 lines (20 loc) · 917 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
language: go
go:
- "1.11"
before_install:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- go get -v golang.org/x/lint/golint
- go get -v github.com/mattn/goveralls
- go get -v golang.org/x/tools/cmd/cover
- dep ensure -v
script:
- >-
for N in $(go list ./...); do CGO_ENABLED=0 go test -a -covermode=count -coverprofile=${N//\//_}.out -ldflags '-s -w' -tags=unit -v $N 1>/dev/null; done;
echo 'mode:'' count' > coverage.out && cat *.out | grep -v 'mode:' | sort -r | awk '{if($1 != last) {print $0;last=$1}}' >> coverage.out;
$HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN;
- test -z "$(go vet ./... | tee /dev/stderr)"
- test -z "$(gofmt -d -s cmd | tee /dev/stderr)"
- test -z "$(gofmt -d -s pkg | tee /dev/stderr)"
- golint -set_exit_status cmd/... pkg/...
notifications:
email: false