5
5
push :
6
6
branches :
7
7
- main
8
+ - ' *-dev'
8
9
9
10
jobs :
10
11
format :
32
33
runs-on : ubuntu-20.04
33
34
strategy :
34
35
matrix :
35
- runtime : [async-std, tokio, actix ]
36
- tls : [native-tls, rustls]
36
+ runtime : [async-std, tokio]
37
+ tls : [native-tls, rustls, none ]
37
38
steps :
38
39
- uses : actions/checkout@v2
39
40
@@ -53,22 +54,22 @@ jobs:
53
54
args : >
54
55
--manifest-path sqlx-core/Cargo.toml
55
56
--no-default-features
56
- --features offline,all-databases,all-types, migrate,runtime -${{ matrix.runtime }}-${{ matrix.tls }}
57
+ --features json, offline,migrate,_rt -${{ matrix.runtime }},_tls -${{ matrix.tls }}
57
58
58
59
- uses : actions-rs/cargo@v1
59
60
with :
60
61
command : check
61
62
args : >
62
63
--no-default-features
63
- --features offline, all-databases,all-types,migrate, runtime-${{ matrix.runtime }}-${{ matrix.tls }},macros
64
+ --features all-databases,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }},macros
64
65
65
66
test :
66
67
name : Unit Test
67
68
runs-on : ubuntu-20.04
68
69
strategy :
69
70
matrix :
70
- runtime : [async-std, tokio, actix ]
71
- tls : [native-tls, rustls]
71
+ runtime : [async-std, tokio]
72
+ tls : [native-tls, rustls, none ]
72
73
steps :
73
74
- uses : actions/checkout@v2
74
75
87
88
command : test
88
89
args : >
89
90
--manifest-path sqlx-core/Cargo.toml
90
- --features offline,all-databases,all-types,runtime- ${{ matrix.runtime }}-${{ matrix.tls }}
91
+ --features json,_rt- ${{ matrix.runtime }},_tls -${{ matrix.tls }}
91
92
92
93
cli :
93
94
name : CLI Binaries
@@ -138,8 +139,7 @@ jobs:
138
139
runs-on : ubuntu-20.04
139
140
strategy :
140
141
matrix :
141
- runtime : [async-std, tokio, actix]
142
- tls : [native-tls, rustls]
142
+ runtime : [async-std, tokio]
143
143
needs : check
144
144
steps :
145
145
- uses : actions/checkout@v2
@@ -156,16 +156,18 @@ jobs:
156
156
with :
157
157
key : ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}
158
158
159
+ - run : echo "using ${DATABASE_URL}"
160
+
159
161
- uses : actions-rs/cargo@v1
160
162
with :
161
163
command : test
162
164
args : >
163
165
--no-default-features
164
- --features any,macros,migrate, sqlite,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
166
+ --features any,macros,sqlite,_unstable- all-types,runtime-${{ matrix.runtime }}
165
167
--
166
168
--test-threads=1
167
169
env :
168
- DATABASE_URL : sqlite:// tests/sqlite/sqlite.db
170
+ DATABASE_URL : sqlite:tests/sqlite/sqlite.db
169
171
RUSTFLAGS : --cfg sqlite_ipaddr
170
172
LD_LIBRARY_PATH : /tmp/sqlite3-lib
171
173
@@ -174,9 +176,9 @@ jobs:
174
176
runs-on : ubuntu-20.04
175
177
strategy :
176
178
matrix :
177
- postgres : [14, 10 ]
178
- runtime : [async-std, tokio, actix ]
179
- tls : [native-tls, rustls]
179
+ postgres : [15, 11 ]
180
+ runtime : [async-std, tokio]
181
+ tls : [native-tls, rustls, none ]
180
182
needs : check
181
183
steps :
182
184
- uses : actions/checkout@v2
@@ -199,7 +201,7 @@ jobs:
199
201
with :
200
202
command : build
201
203
args : >
202
- --features postgres,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
204
+ --features postgres,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }}
203
205
204
206
- run : |
205
207
docker-compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }} postgres_${{ matrix.postgres }}
@@ -210,33 +212,54 @@ jobs:
210
212
command : test
211
213
args : >
212
214
--no-default-features
213
- --features any,postgres,macros,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
215
+ --features any,postgres,macros,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }}
214
216
env :
215
217
DATABASE_URL : postgres://postgres:password@localhost:5432/sqlx
216
218
# FIXME: needed to disable `ltree` tests in Postgres 9.6
217
219
# but `PgLTree` should just fall back to text format
218
220
RUSTFLAGS : --cfg postgres_${{ matrix.postgres }}
219
221
220
222
- uses : actions-rs/cargo@v1
223
+ if : matrix.tls != 'none'
221
224
with :
222
225
command : test
223
226
args : >
224
227
--no-default-features
225
- --features any,postgres,macros,migrate, all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
228
+ --features any,postgres,macros,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }}
226
229
env :
227
230
DATABASE_URL : postgres://postgres:password@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=.%2Ftests%2Fcerts%2Fca.crt
228
231
# FIXME: needed to disable `ltree` tests in Postgres 9.6
229
232
# but `PgLTree` should just fall back to text format
230
233
RUSTFLAGS : --cfg postgres_${{ matrix.postgres }}
231
234
235
+ # client SSL authentication
236
+
237
+ - run : |
238
+ docker stop postgres_${{ matrix.postgres }}
239
+ docker-compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }}_client_ssl postgres_${{ matrix.postgres }}_client_ssl
240
+ docker exec postgres_${{ matrix.postgres }}_client_ssl bash -c "until pg_isready; do sleep 1; done"
241
+
242
+ - uses : actions-rs/cargo@v1
243
+ if : matrix.tls != 'none'
244
+ with :
245
+ command : test
246
+ args : >
247
+ --no-default-features
248
+ --features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
249
+ env :
250
+ DATABASE_URL : postgres://postgres@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=.%2Ftests%2Fcerts%2Fca.crt&sslkey=.%2Ftests%2Fkeys%2Fclient.key&sslcert=.%2Ftests%2Fcerts%2Fclient.crt
251
+ # FIXME: needed to disable `ltree` tests in Postgres 9.6
252
+ # but `PgLTree` should just fall back to text format
253
+ RUSTFLAGS : --cfg postgres_${{ matrix.postgres }}_client_ssl
254
+
232
255
mysql :
233
256
name : MySQL
234
257
runs-on : ubuntu-20.04
235
258
strategy :
236
259
matrix :
237
260
mysql : [8, 5_7]
238
- runtime : [async-std, tokio, actix ]
239
- tls : [native-tls, rustls]
261
+ runtime : [async-std, tokio]
262
+ tls : [native-tls, rustls, none ]
240
263
needs : check
241
264
steps :
242
265
- uses : actions/checkout@v2
@@ -255,19 +278,20 @@ jobs:
255
278
with :
256
279
command : build
257
280
args : >
258
- --features mysql,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
281
+ --features mysql,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }}
259
282
260
- - run : docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 mysql_${{ matrix.mysql }}
283
+ - run : docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 --name mysql_${{ matrix.mysql }} mysql_${{ matrix.mysql }}
261
284
- run : sleep 60
262
285
263
286
- uses : actions-rs/cargo@v1
264
287
with :
265
288
command : test
266
289
args : >
267
290
--no-default-features
268
- --features any,mysql,macros,migrate, all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
291
+ --features any,mysql,macros,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }}
269
292
env :
270
293
DATABASE_URL : mysql://root:password@localhost:3306/sqlx?ssl-mode=disabled
294
+ RUSTFLAGS : --cfg mysql_${{ matrix.mysql }}
271
295
272
296
# MySQL 5.7 supports TLS but not TLSv1.3 as required by RusTLS.
273
297
- uses : actions-rs/cargo@v1
@@ -276,18 +300,38 @@ jobs:
276
300
command : test
277
301
args : >
278
302
--no-default-features
279
- --features any,mysql,macros,migrate, all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
303
+ --features any,mysql,macros,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }}
280
304
env :
281
305
DATABASE_URL : mysql://root:password@localhost:3306/sqlx
306
+ RUSTFLAGS : --cfg mysql_${{ matrix.mysql }}
307
+
308
+ # client SSL authentication
309
+
310
+ - run : |
311
+ docker stop mysql_${{ matrix.mysql }}
312
+ docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 --name mysql_${{ matrix.mysql }}_client_ssl mysql_${{ matrix.mysql }}_client_ssl
313
+ sleep 60
314
+
315
+ # MySQL 5.7 supports TLS but not TLSv1.3 as required by RusTLS.
316
+ - uses : actions-rs/cargo@v1
317
+ if : ${{ !(matrix.mysql == '5_7' && matrix.tls == 'rustls') && matrix.tls != 'none' }}
318
+ with :
319
+ command : test
320
+ args : >
321
+ --no-default-features
322
+ --features any,mysql,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
323
+ env :
324
+ DATABASE_URL : mysql://root@localhost:3306/sqlx?sslmode=verify_ca&ssl-ca=.%2Ftests%2Fcerts%2Fca.crt&ssl-key=.%2Ftests%2Fkeys%2Fclient.key&ssl-cert=.%2Ftests%2Fcerts%2Fclient.crt
325
+ RUSTFLAGS : --cfg mysql_${{ matrix.mysql }}
282
326
283
327
mariadb :
284
328
name : MariaDB
285
329
runs-on : ubuntu-20.04
286
330
strategy :
287
331
matrix :
288
332
mariadb : [10_6, 10_3]
289
- runtime : [async-std, tokio, actix ]
290
- tls : [native-tls, rustls]
333
+ runtime : [async-std, tokio]
334
+ tls : [native-tls, rustls, none ]
291
335
needs : check
292
336
steps :
293
337
- uses : actions/checkout@v2
@@ -306,56 +350,35 @@ jobs:
306
350
with :
307
351
command : build
308
352
args : >
309
- --features mysql,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
353
+ --features mysql,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }}
310
354
311
- - run : docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 mariadb_${{ matrix.mariadb }}
355
+ - run : docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 --name mariadb_${{ matrix.mariadb }} mariadb_${{ matrix.mariadb }}
312
356
- run : sleep 30
313
357
314
358
- uses : actions-rs/cargo@v1
315
359
with :
316
360
command : test
317
361
args : >
318
362
--no-default-features
319
- --features any,mysql,macros,migrate, all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
363
+ --features any,mysql,macros,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }}
320
364
env :
321
365
DATABASE_URL : mysql://root:password@localhost:3306/sqlx
366
+ RUSTFLAGS : --cfg mariadb_${{ matrix.mariadb }}
322
367
323
- mssql :
324
- name : MSSQL
325
- runs-on : ubuntu-20.04
326
- strategy :
327
- matrix :
328
- mssql : [2019, 2017]
329
- runtime : [async-std, tokio, actix]
330
- tls : [native-tls, rustls]
331
- needs : check
332
- steps :
333
- - uses : actions/checkout@v2
334
-
335
- - uses : actions-rs/toolchain@v1
336
- with :
337
- profile : minimal
338
- toolchain : stable
339
- override : true
340
-
341
- - uses : Swatinem/rust-cache@v1
342
- with :
343
- key : ${{ runner.os }}-mssql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
368
+ # client SSL authentication
344
369
345
- - uses : actions-rs/cargo@v1
346
- with :
347
- command : build
348
- args : >
349
- --features mssql,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
350
-
351
- - run : docker-compose -f tests/docker-compose.yml run -d -p 1433:1433 mssql_${{ matrix.mssql }}
352
- - run : sleep 80 # MSSQL takes a "bit" to startup
370
+ - run : |
371
+ docker stop mariadb_${{ matrix.mariadb }}
372
+ docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 --name mariadb_${{ matrix.mariadb }}_client_ssl mariadb_${{ matrix.mariadb }}_client_ssl
373
+ sleep 60
353
374
354
375
- uses : actions-rs/cargo@v1
376
+ if : matrix.tls != 'none'
355
377
with :
356
378
command : test
357
379
args : >
358
380
--no-default-features
359
- --features any,mssql ,macros,migrate, all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
381
+ --features any,mysql ,macros,_unstable- all-types,runtime-${{ matrix.runtime }},tls -${{ matrix.tls }}
360
382
env :
361
- DATABASE_URL : mssql://sa:Password123!@localhost/sqlx
383
+ DATABASE_URL : mysql://root@localhost:3306/sqlx?sslmode=verify_ca&ssl-ca=.%2Ftests%2Fcerts%2Fca.crt&ssl-key=.%2Ftests%2Fkeys%2Fclient.key&ssl-cert=.%2Ftests%2Fcerts%2Fclient.crt
384
+ RUSTFLAGS : --cfg mariadb_${{ matrix.mariadb }}
0 commit comments