forked from Netflix/chaosmonkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
30 lines (24 loc) · 979 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
# sudo is required for docker
sudo: required
language: go
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 github.com/golang/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 server
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