-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.travis.yml
42 lines (35 loc) · 1.19 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
git:
depth: 10
language: go
matrix:
include:
# linter
- go: 1.18.x
sudo: false
env: LINTER=true GOFLAGS=-mod=vendor GO111MODULE=auto
# unit tests
- go: 1.18.x
sudo: false
env: UNIT_TESTS=true NOMOCKGEN=1 GOFLAGS=-mod=vendor GO111MODULE=auto GOTEST=gotest
- go: 1.18.x
sudo: false
env: UNIT_TESTS=true NOMOCKGEN=1 GOFLAGS=-mod=vendor GO111MODULE=auto GOTEST=gotest
- go: 1.18.x
sudo: false
env: UNIT_TESTS=true NOMOCKGEN=1 GOFLAGS=-mod=vendor GO111MODULE=auto GOTEST=gotest
# e2e tests
- go: 1.18.x
sudo: required
services: docker
env: E2E_TESTS=true GOFLAGS=-mod=vendor GO111MODULE=auto
install:
- go mod tidy
- go mod vendor
- (cd / && go get -u github.com/golang/mock/mockgen)
- (cd / && go get -u github.com/rakyll/gotest)
before_script:
- if [ "$LINTER" = true ]; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.45.2; fi
script:
- if [ "$LINTER" = true ]; then golangci-lint version && make lint; fi
- if [ "$UNIT_TESTS" = true ]; then make unit-test; fi
- if [ "$E2E_TESTS" = true ]; then make e2e-test; fi