This repository has been archived by the owner on May 11, 2022. It is now read-only.
generated from octomation/go-tool
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (48 loc) · 1.82 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
- GO111MODULE=on
go:
- master
- 1.x
- 1.15.x
jobs:
allow_failures:
- go: master
before_script:
- make env deps-fetch
- |
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
deploy:
- provider: script
cleanup: false
script: curl -sL https://git.io/goreleaser | bash
on:
tags: true
condition: $TRAVIS_GO_VERSION == 1.15*
notifications:
slack:
secure: ZmL8L1saxPZmSmHtFJQ4JVVxxOnA2Vy4w/48bsbOy0IkDJIyb6plH7S3+XKLX5+Y1SIbyPXoBkrWnQ31AfGXyUBWJe4noDFXA7eHiJBpSyxXid8rcmernJePclGczMm3QlMxZ/A3grD172Pz9IEESGwWiiF0xZmIoiohVZ0vNuOqJhoHcWnYhxnILO5ArFi3MpjP4qM/5A+hsgoLYOxbjbOOO8RmpRu71BZ4E8/Iw8anfvezx+UGy5j6A9knHI5w3JBOfXdjjaZpanu+Yu+7k2sIdLYRMAFpu8HzKMPYFHXv0+RGJFbOxlxBD9e+WqH1RM0kZSMQfE51r8e9twQaTwEKvDixHq09Yji+aUVt27ySf23UmIrJs1gL3qijUSsyFDkZycmgL5FFDgoKXHKMm2eisHJhDeOlikHdu9jYjbXf1jr5NUT+yrmfA/HsezcZpQ2ynMLQPb/aqGgDoAMB9lVO8Otv/f5+ETejiu7szJiNTLl4HeBqb14Q+kRL1zmXRnrz91a8JkGx8X76ZKSWu9G0A8GTXZiFANuz52fBl679U9yjZuxjr7hQZ3+ms1tcIYn+WNehaP7lzzINmxBKx7Kzs685y0idDl4Apydzqeda/yP/RvfS6Gj3LQl0fFv5sVaFcWL9hYqLuODIv2RJDvw33zGSV/d1yuZ8m/fq3No=