-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (31 loc) · 965 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
34
35
36
language: go
go:
- 1.5.x
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
- 1.11.x
- tip
matrix:
allow_failures:
- go: tip
include:
- go: 1.11.x
name: "Code Quality"
env: CODE_QUALITY=1
before_install:
- sudo apt-get update -qq > apt-get.out 2>&1 || (cat apt-get.out && exit 1)
- sudo apt-get install libgmp-dev -qq > apt-get.out 2>&1 || (cat apt-get.out && exit 1)
install:
- go get -t ./...
- if [[ -n $CODE_QUALITY ]]; then go get -u github.com/kisielk/errcheck ; fi
- if [[ -n $CODE_QUALITY ]]; then go get -u golang.org/x/tools/cmd/goimports ; fi
- if [[ -n $CODE_QUALITY ]]; then go get -u golang.org/x/lint/golint ; fi
script:
- go test -short
- if [[ -n $CODE_QUALITY ]]; then go vet ./... ; fi
- if [[ -n $CODE_QUALITY ]]; then errcheck ./... ; fi
- if [[ -n $CODE_QUALITY ]]; then goimports -d . | grep . ; test $? -eq 1 ; fi
- if [[ -n $CODE_QUALITY ]]; then golint ./... | grep . ; test $? -eq 1 ; fi