diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..023efcc --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +language: go + +go: + - master + - "1.13" + +install: true + +matrix: + allow_failures: + - go: master + fast_finish: true + +notifications: + email: true + +before_script: + - go get golang.org/x/lint/golint + - go get golang.org/x/tools/cmd/cover + - go get github.com/mattn/goveralls + - go get github.com/go-playground/overalls + - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.6 + +script: + # Run all the tests with the race detector enabled + - overalls -project=github.com/globusdigital/feature-toggles -covermode=atomic -debug -- -race -v -coverpkg=./... + - $HOME/gopath/bin/goveralls -coverprofile=overalls.coverprofile -service=travis-ci -repotoken=$COVERALLS_TOKEN + +after_success: + # Run linter + - golangci-lint run ./... --exclude 'composite literal uses unkeyed fields$' + - golint -set_exit_status $(go list ./...) \ No newline at end of file