-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
63 lines (53 loc) · 1.22 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
60
61
62
63
image: golang:1.12.5
cache:
paths:
- /apt-cache
- /go/src/github.com
- /go/src/golang.org
- /go/src/google.golang.org
- /go/src/gopkg.in
variables:
VENDOR_NAME: 'alephledger'
MAIN_FOLDER: 'gitlab.com/alephledger'
PKG: '${MAIN_FOLDER}/threshold-ecdsa'
TOTEST: '${MAIN_FOLDER}/threshold-ecdsa/pkg'
stages:
- test
- build
before_script:
- chmod +x .gitlab/ci/before_script.sh
- .gitlab/ci/before_script.sh ${GOPATH} ${MAIN_FOLDER} ${PKG} ${VENDOR_NAME} ${CI_PROJECT_DIR}
unit_tests:
stage: test
script:
- .gitlab/ci/make_test.sh ${TOTEST}
race_detector:
stage: test
script:
- .gitlab/ci/make_race.sh ${TOTEST}
code_coverage_report:
stage: build
script:
- .gitlab/ci/make_coverage.sh ${TOTEST} coverage.cov coverage.output coverage.html
artifacts:
paths:
- coverage.output
- coverage.html
expire_in: 1 week
coverage: '/^total:\s*\(statements\)\s*(\d+(?:\.\d+)?%)/'
lint_code:
stage: test
script:
- .gitlab/ci/make_lint.sh ${PKG} golint.out
artifacts:
paths:
- golint.out
expire_in: 1 week
gofmt:
stage: test
script:
- .gitlab/ci/make_fmt.sh ${PKG}
build:
stage: build
script:
- .gitlab/ci/make_build.sh ${PKG} ${GOPATH}