-
Notifications
You must be signed in to change notification settings - Fork 9
/
.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: ccc38Vgx782/BcdHY4opZNNOtVjNU9jXZl57N2aevht530hg+7Zyi9V34uJEn1H6Uwqi27E9MBwjVaUhGe8WmtNrZqCuUjWIOnvA7fyoqX4rdh12U2qkZWg42qI52EKLvxtRMXrWEk7LGUSpzwsy28eE6f2UZZ/R9uFMLmSQqd6xCl5fUKbksKwjqmJg8NmrDGwmVh2Az4jsEukfAUHEj6tFMlsDLZbdglSvoWAjXeJFQ15Bv0ADWWwqkxwo8oaHBqLtUoX/pA7fNJmx04oPiVyikTUFhdaxpXz+XvTCeekjboN4ffvCZfx/a+bol5/7xzV/CFKt6b02f8UWKXJfiIRJBdzHr/VVLuMYZ0RtM6QLfIjmb6p0QDa6KoQNg4ywQkoteToukvR3IY+24MbgIVHqM61H3LbFoBqNl/ohRILBrHJKkLTbWvFG6wJfJ7kIUQwMimsEBS0c17I9NUJYy2GGi0P8pjA2zjDI/CLimBJQviPOQ9805Db90itPDxcsFFwQfDGT8wVyeGmugWudOFfOM6pQs0yCuBJaw+0T9eVogGNKI/Wtw/AdpmT/ZRQ5iLDtX7t1xVWTo0p6sB0zNOiJiRqDHVZlOQTpBirsDtyMJUS/nQ341PJySA1w34sRbbrvRIbCQoO1aFn/7sVWKG8X2/u4u5KX8FJ3aEu9964=
- GO111MODULE=on