-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
38 lines (32 loc) · 1.09 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
language: go
os:
- linux
go:
- 1.8
- 1.9
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
deploy:
skip_cleanup: true
provider: script
script: test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash
go: 1.9
on:
tags: true
all_branches: true