.travis.yml
language: go
sudo: false
go:
- "1.x"
- "1.8"
- "1.10.x"
- master
env:
global:
- COVERAGE_PATH=coverage.out
- CC_TEST_REPORTER_ID=e17727311c0dc148e2c952fb910823f3222f15b017fa5e177d2be8f0fecd9e3b
- CODECOV_TOKEN=1c147a24-d455-4864-878c-e0ece3229a2b
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/)
install: true
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- go get -u -t ./...
- go get -u golang.org/x/lint/golint
- go get -u github.com/mattn/goveralls
- ./cc-test-reporter before-build
script:
- go test -coverprofile=$COVERAGE_PATH ./...
- go vet ./...
after_success:
- $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=$COVERAGE_PATH -service=travis-ci
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT