-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
62 lines (49 loc) · 2.66 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
58
59
60
61
62
# This is a weird way of telling Travis to use the fast container-based test
# runner instead of the slow VM-based runner.
sudo: false
language: go
# Only the last two Go releases are supported by the Go team with security
# updates. Any older versions be considered deprecated. Don't bother testing
# with them.
go:
- 1.11.x
# Enable testing on specific operating system
os:
- linux
# Only clone the most recent commit.
git:
depth: 1
# install additional dependencies required by your project such as Ubuntu packages or custom services
before_install:
- go get golang.org/x/tools/cmd/goimports
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
# install any dependencies required
install:
- go mod vendor
# Don't email me the results of the test runs.
notifications:
email: false
# Anything in before_script that returns a nonzero exit code will flunk the
# build and immediately stop. It's sorta like having set -e enabled in bash.
# Make sure golangci-lint is vendored by running
# dep ensure -add github.com/golangci/golangci-lint/cmd/golangci-lint
# ...and adding this to your Gopkg.toml file.
# required = ["github.com/golangci/golangci-lint/cmd/golangci-lint"]
before_script:
# - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10.1
# run the build script
# script always runs to completion (set +e). If we have linter issues AND a
# failing test, we want to see both. Configure golangci-lint with a
# .golangci.yml file at the top level of your repo.
script:
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./travis/run_on_pull_requests; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./travis/run_on_non_pull_requests; fi'
# additional steps when your build succeeds (such as building documentation, or deploying to a custom server)
# after_success:
# additional steps when your build fails (such as uploading log files)
# after_failure:
env:
global:
- secure: SLwfmMTy7EvBqQxPEmy6ktPEuuFLW7xygv/V639+7fupcklbaSsS2jepjufdWRliX7JDWggy/qJ1QrSwdz671tD4bu2eWPGH9NtZ4d+DtPkMi2/kcyHwTUSGlmzowfLie9dfksgMj7wj7/TXXUbaIibSTyP6UrAbLTeVgsUdBTl59nG98SsFVosCu5PTb9RxtiP2CvWicdpzCM7Go6ySlIHKp7gJAi4Abwtc8uh2tx2HR8LeQQeADl+of6bN+kq43JMfbCRcs8cxlolrdbTYjzO4FvMO/1ZzTcbRfZSihLQaxtzXH5OrWiNHP/FJN+925kgLbA2AFUnLY+XTn2toQnaVMztQGe4pHBExGC/DXFDNGxKH4+0D41ZFXj33NY6RDjAv+WwamBfgKIZwu5IqG0hxEnxtg2jbW/WX1NbxMSnc0bXwmT7wB54GJkYJ8FyjUO2l98yyiZ383UAeG44S78cdhG7U6wL7zfFcR1W9qWKhFokosFuO7DdfTrUXKfbA0SuuqcPXXJdH1qidbPe6JaO5TdOgc+bI1tGWeCjJEGB0yDlThBu+xn4T8OlL4mSmAlBVc+KlYsGxfZqh6q40PUiClLAgow/aeHpZFZg0kWn77vs9gEt4BJL3J6lnTx4sZo5BN19+XHsPeyk8dWt4EZXEvIw/3tMKz17zz10PaDE=
- GO111MODULE=on