.travis.yml
language: go
os: linux
cache:
directories:
- "$HOME/.cache/go-build"
- "$HOME/gopath/pkg/mod"
env:
global:
- CODECLIMATE=https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
go:
- master
- 1.x
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
- 1.15.x
jobs:
allow_failures:
- go: master
before_script:
- |
if [[ $TRAVIS_GO_VERSION == 1.15* ]]; then
curl -sL $CODECLIMATE > /home/travis/gopath/bin/cc-test-reporter
chmod +x /home/travis/gopath/bin/cc-test-reporter
cc-test-reporter before-build
fi
script:
- |
if [[ $TRAVIS_GO_VERSION == 1.15* ]]; then
make test-with-coverage
else
make test
fi
after_script:
- |
if [[ $TRAVIS_GO_VERSION == 1.15* ]]; then
sed -i "s|$(go list -m)/||g" c.out # https://github.com/codeclimate/test-reporter/issues/378
cc-test-reporter after-build -t gocov -p $(go list -m) --exit-code $TRAVIS_TEST_RESULT
fi
notifications:
slack:
secure: ZoMJIj/rPWxkpN4KnBd+9mtKkrbh/IqDf//8yGYvEysIKa2zrPTTOuuAqCMzvSgu6BHFxnkqI3RaVGOgFalGujtHnLdMf+dx1mPA0QAuZPkNOybTJrnHiXehymF1ObAHj0TdCQea0WuDfym16ykAUWps3upqVQ8qTPa8ze7kiARYS8OcNyiVDIv98Ndnct/Sq8VqJFMAuQ+6f/CULgGDJGqR6hoYeacc4JzsoTSL5zv3hu5hNEFlc4XZ7P+OYAJuuh31qIoWzpwf5ApbJx/tX7XoZFPJz6/mmZOEm8DnLpJvX3QA1pGrccZIgHPfOhKKCzR4IFYsyvLubKwBCCsyUe6n/uTaYif5NdX2ZnRhjVceJE6mq+dRNnLBSw1zBBRKG5XXotlNEKAGwl7csauHOutg7eWQJOaMTJ0gFFhVGGHCwWm/fRmSNgHJ6SiIFE+apMac0Z936nKGebwE8Eow4sAYQ0fRwyfy2x3EJFQ/sVEwRhTrrGdPlSyMkcl8VOJCu57id14xK3YZ5nD3DKrlG9TkWt+GIXD/fWcjtDgQ3VVv6taHIjXG3rz/syH8H8k40otoOTKjRHbji7aBdN+Bu8HqDcxOwU5OmI0NRMcjkC8J786CGZRtwqD17UObtbO7XyVno66di8SwSrkAe6FYSLuNEFwrGXPcuB6jltm7l+A=