forked from ovh/go-ovh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
43 lines (36 loc) · 1009 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
37
38
39
40
41
42
43
language: go
cache:
directories:
- $GOPATH/pkg/mod
jobs:
fast_finish: true
include:
- go: 1.12.x
- go: 1.13.x
- go: 1.14.x
- go: 1.x
- go: tip
allow_failures:
- go: tip
before_install:
- export GO111MODULE=off
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- go get golang.org/x/lint/golint
- if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
- GO111MODULE=on
install:
- go mod tidy
- git diff --exit-code go.mod
- git diff --exit-code go.sum
- go mod download
script:
# Test Code quality
- go vet ./...
- ${GOPATH}/bin/golint ./...
- go test -covermode=count -coverprofile=profile.cov ./...
# Test buildable on most common platforms, beyond Linux
- GOOS=darwin go build ./...
- GOOS=windows go build ./...
# Best effort: notify coveralls. It's too unstable, ignore errors.
- $HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci || exit 0