-
Notifications
You must be signed in to change notification settings - Fork 425
/
pipeline.yml
246 lines (221 loc) · 6.49 KB
/
pipeline.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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
---
timeout: &timeout
# steps can run for half an hour, maximum: if they haven't finished by then, there's probably some
# deeper problem. A global timeout would be better
# (https://github.com/buildkite/feedback/issues/170).
timeout_in_minutes: 30
compose-config: &compose-config
config:
- docker-compose.yml
- .buildkite/docker-compose.yml
plugins: &plugins
stellargraph/github-merged-pr#develop:
mode: checkout
steps:
- label: ":docker::python: build 3.6 runner"
<<: *timeout
key: "runner-3_6"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
build: runner-3_6
image-repository: index.docker.io/stellargraph/stellargraph-ci-runner
no-cache: ${REFRESH_BUILD-false}
cache-from:
- runner-3_6:index.docker.io/stellargraph/stellargraph-ci-runner:3_6-${IMAGE_TAG}
- runner-3_6:index.docker.io/stellargraph/stellargraph-ci-runner:3_6-latest
push:
- runner-3_6:index.docker.io/stellargraph/stellargraph-ci-runner:3_6-${IMAGE_TAG}
agents:
queue: "t2medium"
- label: ":docker::python: build 3.7 runner"
<<: *timeout
key: "runner-3_7"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
build: runner-3_7
image-repository: index.docker.io/stellargraph/stellargraph-ci-runner
no-cache: ${REFRESH_BUILD-false}
cache-from:
- runner-3_7:index.docker.io/stellargraph/stellargraph-ci-runner:3_7-${IMAGE_TAG}
- runner-3_7:index.docker.io/stellargraph/stellargraph-ci-runner:3_7-latest
push:
- runner-3_7:index.docker.io/stellargraph/stellargraph-ci-runner:3_7-${IMAGE_TAG}
agents:
queue: "t2medium"
- label: ":python: 3.6"
<<: *timeout
key: "python_3_6"
depends_on: "runner-3_6"
command: ".buildkite/steps/script.sh"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
run: runner-3_6
agents:
queue: "t2medium"
- label: ":python: 3.7"
<<: *timeout
key: "python_3_7"
depends_on: "runner-3_7"
command: ".buildkite/steps/script.sh"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
run: runner-3_7
agents:
queue: "t2medium"
- label: ":python::book: test notebooks %n"
<<: *timeout
key: "test-notebooks"
depends_on: "runner-3_6"
parallelism: 47
command: ".buildkite/steps/test-demo-notebooks.sh"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
run: runner-3_6
agents:
queue: "t2large"
soft_fail:
- exit_status: 2
- &test-neo4j-notebooks
label: ":python::book: test neo4j notebooks against neo4j 4.0"
<<: *timeout
depends_on: "runner-3_6"
command: ".buildkite/steps/test-neo4j-notebooks.sh"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
run: runner-3_6
env:
- STELLARGRAPH_NEO4J_HOST=neo4j
env:
RUNNER_DEPENDS_ON: neo4j
NEO4J_VERSION: "4.0"
agents:
queue: "t2large"
- <<: *test-neo4j-notebooks
label: ":python::book: test neo4j notebooks against neo4j 3.5"
env:
RUNNER_DEPENDS_ON: neo4j
NEO4J_VERSION: "3.5"
- label: ":python-black: format"
<<: *timeout
plugins:
<<: *plugins
docker#v3.5.0:
image: "stellargraph/black:snapshot"
- label: ":python-black::jupyter: check notebook format"
<<: *timeout
depends_on: "runner-3_6"
command: "python scripts/format_notebooks.py --default --ci demos/"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
run: runner-3_6
agents:
queue: "t2medium"
- label: ":jupyter::book: check notebook text"
<<: *timeout
depends_on: "runner-3_6"
command: "python scripts/notebook_text_checker.py demos/"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
run: runner-3_6
agents:
queue: "t2medium"
- label: ":book: check demo indexing"
command: "python scripts/demo_indexing.py --action=compare"
<<: *timeout
depends_on: "runner-3_6"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
run: runner-3_6
agents:
queue: "t2medium"
- label: ":shell: format"
<<: *timeout
plugins:
<<: *plugins
docker#v3.5.0:
image: "mvdan/shfmt:v2.6.4"
command: ["-d", "-i", "2", "-ci", "-sr", "."]
- label: ":shell: shellcheck"
<<: *timeout
command: 'find ./ -type f -name "*.sh" -print0 | xargs -0 shellcheck --color=always'
plugins:
<<: *plugins
docker#v3.5.0:
image: "koalaman/shellcheck-alpine:stable"
- label: ":docker: :hadolint: lint Dockerfiles"
<<: *timeout
plugins:
<<: *plugins
docker#v3.5.0:
image: "stellargraph/hadolint:snapshot"
- label: ":docker: format Dockerfiles"
<<: *timeout
plugins:
<<: *plugins
docker#v3.5.0:
image: "stellargraph/dockerfile-utils:snapshot"
- label: ":prettier::yaml: format YAML"
<<: *timeout
plugins:
<<: *plugins
docker#v3.5.0:
image: "stellargraph/prettier:snapshot"
command: [
"--check",
"**/*.yml",
"**/*.yaml",
# not valid YAML because of jinja templating
"!meta.yaml",
]
- label: ":yaml::lint-roller: lint YAML"
<<: *timeout
plugins:
<<: *plugins
docker#v3.5.0:
image: "stellargraph/yamllint:snapshot"
- label: ":copyright: check copyright headers"
<<: *timeout
command: ".buildkite/steps/check-copyright-headers.sh"
- label: ":space_invader: check whitespace"
<<: *timeout
command: "scripts/whitespace.sh --ci"
- label: ":snake: conda build"
<<: *timeout
command: ".buildkite/steps/conda-build.sh"
plugins:
<<: *plugins
docker-compose#v3.2.0:
<<: *compose-config
run: conda
agents:
queue: "t2medium"
# Analyse the results of the testing, e.g. failures. This is not part of the testing, and has
# explicit dependencies, so can be listed after all of the `wait` steps and publishings, so that
# it runs in parallel with them.
- label: ":memo: annotate with junit"
<<: *timeout
plugins:
junit-annotate#v1.7.0:
artifacts: junit-*.xml
depends_on:
- "python_3_6"
- "python_3_7"
allow_dependency_failure: true