-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
40 lines (33 loc) · 1.03 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
39
40
sudo: false
language: go
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
env:
global:
- CODECLIMATE=https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
- GO111MODULE=on
- GOFLAGS=-mod=vendor
go:
- master
- 1.x
- 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x
- 1.13.x
before_script:
- if [[ $TRAVIS_GO_VERSION == 1.13* ]]; then curl -L $CODECLIMATE > ./cc-test-reporter; fi
- if [[ $TRAVIS_GO_VERSION == 1.13* ]]; then chmod +x ./cc-test-reporter; fi
- if [[ $TRAVIS_GO_VERSION == 1.13* ]]; then ./cc-test-reporter before-build; fi
script:
- if [[ $TRAVIS_GO_VERSION == 1.13* ]]; then make test-with-coverage-profile; else make test; fi
after_script:
- if [[ $TRAVIS_GO_VERSION == 1.13* ]]; then export EXIT_CODE=$TRAVIS_TEST_RESULT; fi
- if [[ $TRAVIS_GO_VERSION == 1.13* ]]; then export PREFIX=$(basename $(go list -m)); fi
- if [[ $TRAVIS_GO_VERSION == 1.13* ]]; then ./cc-test-reporter after-build -t gocov -p $PREFIX; fi
notifications:
slack: octolab:1eMS7IqOArBipiu31jYVd0cN