-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
59 lines (52 loc) · 1.06 KB
/
.gitlab-ci.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
image: golang:1.17
cache:
paths:
- .cache
before_script:
- mkdir -p .cache
- export GOPATH="$CI_PROJECT_DIR/.cache"
stages:
- test
- build
- smoke-test
- release
unit_tests:
stage: test
coverage: '/total:\s+\(statements\)\s+(\d+.\d+\%)/'
script:
- go test --race -v -coverprofile=coverage.out -timeout 15m ./...
- go tool cover -func=coverage.out
lint_code:
cache: {}
image: golangci/golangci-lint:v1.44.2
stage: test
before_script:
- go get mvdan.cc/[email protected]
script:
- golangci-lint run -v
build-docker:
stage: build
image: docker:stable
only:
- master
services:
- docker:20.10.12-dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
before_script:
- apk update
- apk add make git jq curl
- make docker-gitlab-login
script:
- make docker-gitlab-build
- make docker-gitlab-push
release:
stage: release
image: registry.gitlab.com/thorchain/misc/release-tool:latest
only:
- master
except:
- schedules
script:
- release-tool changelog