forked from gramework/gramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
executable file
·52 lines (44 loc) · 1.04 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
language: go
# we use :443 in tests
sudo: required
os:
- linux
- osx
go:
- 1.8.x
- 1.9.1
- 1.9.2
- 1.9.x
- tip
cache:
directories:
- $HOME/.longtestcache
timeout: 21600
matrix:
allow_failures:
- tip
fast_finish: true
before_install:
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/)
- go get -t -v ./...
- go get -v github.com/golang/lint/golint
- go get -v honnef.co/go/tools/cmd/megacheck
- go get -v github.com/fzipp/gocyclo
- go get -v golang.org/x/tools/cmd/goimports
script:
# fail if a .go file hasn't been formatted with goimports
- test -z $(goimports -l $GO_FILES)
# check if it even compiles
- go build
# run the official Go static analyzer
- go vet .
# run all our tests with race detector and coverage analyzer enabled
- ./.test.sh
# "go vet on steroids" + linter
# - megacheck ./...
# forbid code with huge functions
- gocyclo -over 50 $GO_FILES
# one last linter
- golint -set_exit_status $(go list ./...)
after_success:
- bash <(curl -s https://codecov.io/bash)