-
Notifications
You must be signed in to change notification settings - Fork 29
/
.travis.yml
53 lines (46 loc) · 1.28 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
language: go
go:
- "1.11"
- "1.12"
- tip
matrix:
allow_failures:
- go: tip
fast_finish: true
before_install:
# deps
- go get github.com/nu7hatch/gouuid
# linting tools
- go get github.com/golang/lint/golint
# code coverage
- go get github.com/axw/gocov/gocov
- go get golang.org/x/tools/cmd/cover
install:
# make sure stuff actually builds
- go build
- curl -O https://kx.com/$X/3.6/linuxx86.zip
- unzip -d $HOME linuxx86.zip
- rm -f $HOME/q/q.q
- export QHOME=$HOME/q
- export PATH=$PATH:$QHOME/l32
- sudo apt-get update -qq # Update quietly.
- sudo apt-get install libc6-dev-i386
script:
# ensure everything is formatted all pretty like
- if gofmt -l -s . | grep '**.go'; then exit 1; fi
# vet out possible issues
- go vet ./...
# run tests
- go get -t
# - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken=$COVERALLS -v
- go test ./...
after_script:
# check possible styling errors
- golint ./...
# check for potentially complex functions but don't false build
# - gocyclo -over 15 . || true
# refresh godocs in case there were api changes
- |
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$TRAVIS_BRANCH" == "master" ]]; then
go list ./... | xargs -n 1 -I{} curl http://godoc.org/-/refresh -d path={}
fi