-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
68 lines (58 loc) · 1.53 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
language: go
go_import_path: github.com/becoded/go-harvest
os: linux
dist: xenial
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
env:
global:
- GO111MODULE=on
jobs:
allow_failures:
- stage: test
go: master
include:
- stage: lint
os: linux
dist: xenial
go: 1.15.x
before_script:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.31.0
script:
- golangci-lint run
- stage: test
os: linux
dist: xenial
go: 1.15.x
env:
- GO111MODULE=on
name: "Unit Tests go 1.15.x"
script: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
after_success:
- bash <(curl -s https://codecov.io/bash)
- stage: test
os: linux
dist: xenial
go: master
env:
- GO111MODULE=on
name: "Unit Tests go master"
script: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- stage: vet
os: linux
dist: xenial
go: 1.15.x
env:
- GO111MODULE=on
name: "Correctness"
script: go vet ./...
- stage: generate
os: linux
dist: xenial
go: 1.15.x
env:
- GO111MODULE=on
name: "All generated objects are up to data"
script: go generate -x ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code) # Check that go generate ./... produces a zero diff; clean up any changes afterwards.