-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
73 lines (58 loc) · 1.42 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
69
70
71
72
73
language: go
go:
- 1.13
before_install:
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi
install:
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.22.2/install.sh | sh -s -- -b $(go env GOPATH)/bin
stages:
- build
- build_package
- test
- test_required_linters
- test_optional_linters
build: &build
stage: build
install: skip
if: tag IS NOT present
script: make bin
build_package: &build_package
stage: build_package
install: skip
if: tag IS present
script: make
deploy:
- provider: releases
token:
secure: $GITHUB_API_KEY
file_glob: true
file: package-*.tar.gz
skip_cleanup: true
on:
all_branches: true
jobs:
include:
- <<: *build
os: linux
- <<: *build
os: windows
- <<: *build
os: osx
- <<: *build_package
os: linux
- <<: *build_package
os: windows
- <<: *build_package
os: osx
- stage: test
install: skip
script:
- go test -coverprofile=coverage.out -mod=vendor ./cmd/... ./pkg/...
- go tool cover -func=coverage.out
os: linux
- stage: test_required_linters
script: golangci-lint run --config CI/golangci_required_linters.yml cmd/... pkg/...
os: linux
- stage: test_optional_linters
script: golangci-lint run --config CI/golangci_optional_linters.yml cmd/... pkg/...
os: linux