-
Notifications
You must be signed in to change notification settings - Fork 377
Expand file tree
/
Copy pathcontinue_config.yml
More file actions
332 lines (319 loc) · 9.13 KB
/
continue_config.yml
File metadata and controls
332 lines (319 loc) · 9.13 KB
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
version: 2.1
parameters:
client:
type: boolean
default: false
common:
type: boolean
default: false
python:
type: boolean
default: false
orbs:
windows: circleci/windows@5.0
commands:
halt_unless_core:
steps:
- unless:
condition:
or:
- << pipeline.parameters.common >>
- << pipeline.parameters.python >>
- equal: [main, << pipeline.git.branch >>]
steps:
- run: circleci-agent step halt
halt_unless_client:
steps:
- unless:
condition:
or:
- << pipeline.parameters.common >>
- << pipeline.parameters.client >>
- equal: [main, << pipeline.git.branch >>]
steps:
- run: circleci-agent step halt
jobs:
vscode_test:
docker:
- image: cimg/node:20.19.1-browsers
resource_class: small
steps:
- checkout
- run:
name: Install Dependencies
command: |
pnpm install
- run:
name: Run VSCode extension CI
command: |
cd vscode/extension
pnpm run ci
doc_tests:
docker:
- image: cimg/python:3.10
resource_class: small
steps:
- halt_unless_core
- checkout
- run:
name: Install dependencies
command: make install-dev install-doc
- run:
name: Run doc tests
command: make doc-test
style_and_cicd_tests:
parameters:
python_version:
type: string
docker:
- image: cimg/python:<< parameters.python_version >>
resource_class: large
environment:
PYTEST_XDIST_AUTO_NUM_WORKERS: 8
steps:
- halt_unless_core
- checkout
- run:
name: Install OpenJDK
command: sudo apt-get update && sudo apt-get install default-jdk
- run:
name: Install ODBC
command: sudo apt-get install unixodbc-dev
- run:
name: Install SQLMesh dev dependencies
command: make install-dev
- run:
name: Fix Git URL override
command: git config --global --unset url."ssh://git@github.com".insteadOf
- run:
name: Run linters and code style checks
command: make py-style
- unless:
condition:
equal: ["3.9", << parameters.python_version >>]
steps:
- run:
name: Exercise the benchmarks
command: make benchmark-ci
- run:
name: Run cicd tests
command: make cicd-test
- store_test_results:
path: test-results
cicd_tests_windows:
executor:
name: windows/default
size: large
steps:
- halt_unless_core
- run:
name: Enable symlinks in git config
command: git config --global core.symlinks true
- checkout
- run:
name: Install System Dependencies
command: |
choco install make which -y
refreshenv
- run:
name: Install SQLMesh dev dependencies
command: |
python -m venv venv
. ./venv/Scripts/activate
python.exe -m pip install --upgrade pip
make install-dev
- run:
name: Run fast unit tests
command: |
. ./venv/Scripts/activate
which python
python --version
make fast-test
- store_test_results:
path: test-results
migration_test:
docker:
- image: cimg/python:3.10
resource_class: small
environment:
SQLMESH__DISABLE_ANONYMIZED_ANALYTICS: "1"
steps:
- halt_unless_core
- checkout
- run:
name: Run the migration test - sushi
command: ./.circleci/test_migration.sh sushi "--gateway duckdb_persistent"
- run:
name: Run the migration test - sushi_dbt
command: ./.circleci/test_migration.sh sushi_dbt "--config migration_test_config"
ui_style:
docker:
- image: cimg/node:20.19.0
resource_class: small
steps:
- checkout
- restore_cache:
name: Restore pnpm Package Cache
keys:
- pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
- run:
name: Install Dependencies
command: |
pnpm install
- save_cache:
name: Save pnpm Package Cache
key: pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
paths:
- .pnpm-store
- run:
name: Run linters and code style checks
command: pnpm run lint
ui_test:
docker:
- image: mcr.microsoft.com/playwright:v1.54.1-jammy
resource_class: medium
steps:
- halt_unless_client
- checkout
- restore_cache:
name: Restore pnpm Package Cache
keys:
- pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
- run:
name: Install pnpm package manager
command: |
npm install --global corepack@latest
corepack enable
corepack prepare pnpm@latest-10 --activate
pnpm config set store-dir .pnpm-store
- run:
name: Install Dependencies
command: |
pnpm install
- save_cache:
name: Save pnpm Package Cache
key: pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
paths:
- .pnpm-store
- run:
name: Run tests
command: npm --prefix web/client run test
engine_tests_docker:
parameters:
engine:
type: string
machine:
image: ubuntu-2404:2024.05.1
docker_layer_caching: true
resource_class: large
environment:
SQLMESH__DISABLE_ANONYMIZED_ANALYTICS: "1"
steps:
- halt_unless_core
- checkout
- run:
name: Install OS-level dependencies
command: ./.circleci/install-prerequisites.sh "<< parameters.engine >>"
- run:
name: Run tests
command: make << parameters.engine >>-test
no_output_timeout: 20m
- store_test_results:
path: test-results
engine_tests_cloud:
parameters:
engine:
type: string
docker:
- image: cimg/python:3.12
resource_class: medium
environment:
PYTEST_XDIST_AUTO_NUM_WORKERS: 4
SQLMESH__DISABLE_ANONYMIZED_ANALYTICS: "1"
steps:
- halt_unless_core
- checkout
- run:
name: Install OS-level dependencies
command: ./.circleci/install-prerequisites.sh "<< parameters.engine >>"
- run:
name: Generate database name
command: |
UUID=`cat /proc/sys/kernel/random/uuid`
TEST_DB_NAME="circleci_${UUID:0:8}"
echo "export TEST_DB_NAME='$TEST_DB_NAME'" >> "$BASH_ENV"
echo "export SNOWFLAKE_DATABASE='$TEST_DB_NAME'" >> "$BASH_ENV"
echo "export DATABRICKS_CATALOG='$TEST_DB_NAME'" >> "$BASH_ENV"
echo "export REDSHIFT_DATABASE='$TEST_DB_NAME'" >> "$BASH_ENV"
echo "export GCP_POSTGRES_DATABASE='$TEST_DB_NAME'" >> "$BASH_ENV"
echo "export FABRIC_DATABASE='$TEST_DB_NAME'" >> "$BASH_ENV"
# Make snowflake private key available
echo $SNOWFLAKE_PRIVATE_KEY_RAW | base64 -d > /tmp/snowflake-keyfile.p8
echo "export SNOWFLAKE_PRIVATE_KEY_FILE='/tmp/snowflake-keyfile.p8'" >> "$BASH_ENV"
- run:
name: Create test database
command: ./.circleci/manage-test-db.sh << parameters.engine >> "$TEST_DB_NAME" up
- run:
name: Run tests
command: |
make << parameters.engine >>-test
no_output_timeout: 20m
- run:
name: Tear down test database
command: ./.circleci/manage-test-db.sh << parameters.engine >> "$TEST_DB_NAME" down
when: always
- store_test_results:
path: test-results
workflows:
main_pr:
jobs:
- doc_tests
- style_and_cicd_tests:
matrix:
parameters:
python_version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- cicd_tests_windows
- engine_tests_docker:
name: engine_<< matrix.engine >>
matrix:
parameters:
engine:
- duckdb
- postgres
- mysql
- mssql
- trino
- spark
- clickhouse
- risingwave
- starrocks
- engine_tests_cloud:
name: cloud_engine_<< matrix.engine >>
context:
- sqlmesh_cloud_database_integration
requires:
- engine_tests_docker
matrix:
parameters:
engine:
- snowflake
- databricks
- redshift
- bigquery
- clickhouse-cloud
- athena
- fabric
- gcp-postgres
filters:
branches:
only:
- main
- ui_style
- ui_test
- vscode_test
- migration_test