forked from zcash/lightwalletd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
130 lines (114 loc) · 2.69 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# /************************************************************************
# File: .gitlab-ci.yml
# Author: mdr0id
# Date: 7/16/2019
# Description: Used to setup runners/jobs for lightwalletd
# Usage: Commit source and the pipeline will trigger the according jobs.
#
# Known bugs/missing features:
#
# IMPORTANT NOTE: any job with preceeding '.'' is ignored in pipeline
# ************************************************************************/
image: golang:1.11-alpine
stages:
- build
- test
- deploy
- monitor
before_script:
- apk update && apk add make git gcc musl-dev curl bash
# ************************************************************************/
# BUILD
# ************************************************************************/
.lint-check:
stage: build
script:
- make lint
.build-docs:
stage: build
script:
- make docs
build:build-linux:
stage: build
script:
- make
artifacts:
paths:
- ./lightwalletd
.build-windows:
stage: build
script:
- make
.build-mac:
stage: build
script:
- make
# Build against latest Golang
.build-latest:
stage: build
image: golang:latest-alpine
script:
- make
allow_failure: true
# ************************************************************************/
# TEST
# ************************************************************************/
test:test-unittest:
stage: test
dependencies:
- build:build-linux
script:
- make test
after_script:
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
.test:test-race-conditions:
stage: test
dependencies:
- build:build-linux
script:
- make race
allow_failure: true
.test:test-coverage:
stage: test
dependencies:
- build:build-linux
script:
- make coverage
- make coverage_report
- make coverage_html
artifacts:
paths:
- ./coverage.html
# ************************************************************************/
# DEPLOY
# ************************************************************************/
.deploy_staging:
stage: deploy
script:
- make
- make test
environment:
name: staging
only:
- master
after_script:
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
.release-candidate:
stage: deploy
script:
- echo "Generating v0.0.1-rc"
when: manual
.release-production:
stage: deploy
script:
- echo "Generating v0.0.1"
when: manual
# ************************************************************************/
# MONITOR
# ************************************************************************/
.monitor-release:
stage: deploy
script:
- echo "Building docker image for v0.0.0"
- make image
when: manual