-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
30 lines (26 loc) · 1005 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
language: go
go:
- "stable"
cache:
directories:
- $GOPATH/pkg/mod
# Override the base install phase so that the project can be installed using
# `-mod=vendor` to use the vendored dependencies
install:
# Install `golangci-lint` using their installer script
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.29.0
# Install `cover` and `goveralls` without `GO111MODULE` enabled so that we
# don't download project dependencies and just put the tools in $GOPATH/bin
- GO111MODULE=off go get golang.org/x/tools/cmd/cover
- GO111MODULE=off go get github.com/mattn/goveralls
- go mod tidy
- git diff --exit-code go.mod
- git diff --exit-code go.sum
- go mod download
- go mod vendor
- go install -mod=vendor -v -race ./...
script:
- set -e
- golangci-lint run
- go test -mod=vendor -v -race -covermode=atomic -coverprofile=coverage.out ./...
- goveralls -coverprofile=coverage.out -service=travis-ci