-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
46 lines (39 loc) · 1.45 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
language: go
sudo: required
dist: bionic
go_import_path: go.aporeto.io/netlink-go
matrix:
include:
- go: "1.13.x"
- go: "1.14.x"
- go: master
allow_failures:
- go: "1.14.x"
- go: master
fast_finish: true
env:
global:
- GOPRIVATE="go.aporeto.io,github.com/aporeto-inc"
- GO111MODULE=auto
- TOOLS_CMD=golang.org/x/tools/cmd
- PATH=$GOROOT/bin:$PATH
- SUDO_PERMITTED=1
before_install:
- GO111MODULE=off go get -u gopkg.in/alecthomas/gometalinter.v2
- GO111MODULE=off gometalinter.v2 --install
install:
- sudo apt-get install conntrack
- go mod download
- go list -m all || true
## go modules hack -
## gometalinter does not understand the go modules package cache and
## fails to lint. So treat it like a non module library for linting. To do this,
## we load all the dependent modules into a vendor folder then flatten
## that into the standard GOROOT for linting
## TODO - gometalinter is deprecated. Use https://github.com/golangci/golangci-lint
script:
- go mod vendor
- cp -pr ./vendor/* $GOPATH/src/
- rm -rf ./vendor
- GO111MODULE=off gometalinter.v2 --vendor --disable-all --enable=vet --enable=vetshadow --enable=golint --enable=structcheck --enable=deadcode --enable=ineffassign --enable=gotype --enable=goimports --enable=varcheck --enable=interfacer --enable=goconst --enable=gosimple --enable=staticcheck --enable=unused --enable=misspell --deadline=5m -e mock ./...
- sudo -E env "PATH=$PATH" go test ./...