-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
language: go | ||
|
||
go: | ||
- "1.10.x" | ||
|
||
env: | ||
- DEP_VERSION="0.4.1" | ||
|
||
before_install: | ||
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep | ||
- chmod +x $GOPATH/bin/dep | ||
|
||
install: | ||
- dep ensure | ||
|
||
before_script: | ||
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/ | ||
- go get github.com/golang/lint/golint | ||
- go get honnef.co/go/tools/cmd/megacheck | ||
|
||
script: | ||
- test -z $(gofmt -s -l $GO_FILES) # Fail if a .go file hasn't been formatted with gofmt | ||
- go test -v -race ./... # Run all the tests with the race detector enabled | ||
- go vet ./... # go vet is the official Go static analyzer | ||
- megacheck ./... # "go vet on steroids" + linter | ||
- golint -set_exit_status $(go list ./...) # one last linter | ||
|
||
|