-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.travis.yml
35 lines (28 loc) · 1.14 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
# sudo is required for docker
sudo: required
language: go
go:
- "1.20.x"
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:8.0
- go install golang.org/x/lint/golint@latest
- go install github.com/kisielk/errcheck@latest
- go get github.com/spf13/afero@v0.0.0-20160919210114-52e4a6cfac46
- go get github.com/fsnotify/fsnotify@v1.3.2-0.20160816051541-f12c6236fe7b
# 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