forked from Netflix/chaosmonkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (26 loc) · 964 Bytes
/
.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
# sudo is required for docker
sudo: required
language: go
go:
- "1.14"
env:
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
services:
- docker
install:
- docker pull mysql:5.6
- go get golang.org/x/lint/golint
- go get github.com/kisielk/errcheck
# With the "docker" tag enabled on go test invocation (-tags docker)
# the mysql:5.6 docker container will be started
# and the mysql tests will connect to this container
# This requires us to stop the pre-installed mysql team
script:
- sudo service mysql stop
- diff -u <(echo -n) <(gofmt -d `find . -name '*.go' | grep -Ev '/vendor/|/migration'`)
- go list ./... | grep -Ev '/vendor/|/migration' | xargs -L1 golint
- go vet `go list ./... | grep -v /vendor/`
- errcheck -ignore 'io:Close' -ignoretests `go list ./... | grep -v /vendor/`
- go test -v ./...
after_success:
- ./update-docs.sh