-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
203 lines (193 loc) · 5.79 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
default:
image: registry.bochslerfinance.com/runners-images/dfinity-canisters:0.22.0@sha256:11730bea35bb5b41aaec9c600a6b7ac837188d21d8d9ce97f781a7b74ad1fd01
tags:
- docker
interruptible: true
before_script:
- dfx --version
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- api_failure
- runner_unsupported
- unknown_failure
cache:
- key: "dfx-$CI_COMMIT_REF_SLUG"
paths:
- .dfx
stages:
- preparation
- lint
- test
- integration_testing
- build
- deploy
include:
# Templates:
- local: scripts/ci-cd/.node_template.yml
- local: scripts/ci-cd/.rust_template.yml
- local: scripts/ci-cd/.dfx_templates.yml
# Frontend linters:
- local: scripts/ci-cd/.frontend_linter.yml
inputs:
src-folder: gld_landing_page
- local: scripts/ci-cd/.frontend_linter.yml
inputs:
src-folder: gldt_swap_app
- local: scripts/ci-cd/.frontend_linter.yml
inputs:
src-folder: usdg
- local: scripts/ci-cd/.frontend_linter.yml
inputs:
src-folder: gld_dashboard
# Unit tests
- local: scripts/ci-cd/.canister_unit_test_coverage.yml
inputs:
src-folder: buyback_burn
- local: scripts/ci-cd/.canister_unit_test_coverage.yml
inputs:
src-folder: icp_neuron
# - local: scripts/ci-cd/.canister_unit_test_coverage.yml
# inputs:
# src-folder: super_stats_v3
- local: scripts/ci-cd/.canister_unit_test_coverage.yml
inputs:
src-folder: token_metrics
- local: scripts/ci-cd/.canister_unit_test_coverage.yml
inputs:
src-folder: sns_rewards
- local: scripts/ci-cd/.canister_unit_test_coverage.yml
inputs:
src-folder: management
- local: scripts/ci-cd/.canister_unit_test_coverage.yml
inputs:
src-folder: sns_neuron_controller
- local: scripts/ci-cd/.canister_unit_test_coverage.yml
inputs:
src-folder: gldt_swap
# Integration tests
- local: scripts/ci-cd/.integration_tests.yml
# Canister builds
- local: scripts/ci-cd/.canister_builds.yml
inputs:
src-folder: buyback_burn
- local: scripts/ci-cd/.canister_builds.yml
inputs:
src-folder: management
- local: scripts/ci-cd/.canister_builds.yml
inputs:
src-folder: icp_neuron
- local: scripts/ci-cd/.canister_builds.yml
inputs:
src-folder: sns_neuron_controller
- local: scripts/ci-cd/.canister_builds.yml
inputs:
src-folder: sns_rewards
- local: scripts/ci-cd/.canister_builds.yml
inputs:
src-folder: super_stats_v3
- local: scripts/ci-cd/.canister_builds.yml
inputs:
src-folder: token_metrics
- local: scripts/ci-cd/.canister_builds.yml
inputs:
src-folder: gldt_swap
# Frontend builds
- local: scripts/ci-cd/.frontend_builds.yml
inputs:
src-folder: gld_landing_page
- local: scripts/ci-cd/.frontend_builds.yml
inputs:
src-folder: gldt_swap_app
- local: scripts/ci-cd/.frontend_builds.yml
inputs:
src-folder: gld_dashboard
- local: scripts/ci-cd/.frontend_builds.yml
inputs:
src-folder: usdg
# Backend deployments
- local: scripts/ci-cd/.canister_deploys.yml
inputs:
src-folder: gldt_swap
- local: scripts/ci-cd/.canister_deploys.yml
inputs:
src-folder: buyback_burn
- local: scripts/ci-cd/.canister_deploys.yml
inputs:
src-folder: management
- local: scripts/ci-cd/.canister_deploys.yml
inputs:
src-folder: icp_neuron
- local: scripts/ci-cd/.canister_deploys.yml
inputs:
src-folder: sns_neuron_controller
- local: scripts/ci-cd/.canister_deploys.yml
inputs:
src-folder: sns_rewards
# - local: scripts/ci-cd/.canister_deploys.yml
# inputs:
# src-folder: super_stats_v3
- local: scripts/ci-cd/.canister_deploys.yml
inputs:
src-folder: token_metrics
# Frontend deployments
- local: scripts/ci-cd/.frontend_deploys.yml
inputs:
src-folder: gld_dashboard
sns-controlled: "true"
- local: scripts/ci-cd/.frontend_deploys.yml
inputs:
src-folder: gldt_swap_app
sns-controlled: "false"
- local: scripts/ci-cd/.frontend_deploys.yml
inputs:
src-folder: usdg
sns-controlled: "false"
- local: scripts/ci-cd/.frontend_deploys.yml
inputs:
src-folder: gld_landing_page
sns-controlled: "false"
################################################################################
# Cache preparation
################################################################################
node cache:
stage: preparation
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- "./frontend/**/*.{js,json,jsx,md,mdx,css,html,svg}"
extends: .node template
script:
- npm pkg get name description author license workspaces engines
- node --version
- npm --version
################################################################################
# Linters
################################################################################
# See includes above for frontends lint
rust lint:
stage: lint
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- "Cargo.{lock,toml}"
- "backend/**/*.{rs,toml,lock,md,did,wasm,gz}"
- if: $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_REF_NAME == "develop"
changes:
- "Cargo.{lock,toml}"
- "backend/**/*.{rs,toml,lock,md,did,wasm,gz}"
extends: .rust template
script:
- cargo clippy
################################################################################
# Unit tests
################################################################################
# See includes above
################################################################################
# Builds
################################################################################
# See includes above for canister builds