@@ -229,6 +229,8 @@ jobs:
229
229
230
230
- run : |
231
231
docker compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }} postgres_${{ matrix.postgres }}
232
+
233
+ - run : |
232
234
docker exec postgres_${{ matrix.postgres }} bash -c "until pg_isready; do sleep 1; done"
233
235
234
236
# Create data dir for offline mode
@@ -290,23 +292,37 @@ jobs:
290
292
SQLX_OFFLINE_DIR: .sqlx
291
293
RUSTFLAGS: --cfg postgres="${{ matrix.postgres }}"
292
294
293
- # client SSL authentication
295
+ postgres-ssl-auth :
296
+ name : Postgres SSL Auth
297
+ runs-on : ubuntu-24.04
298
+ strategy :
299
+ matrix :
300
+ postgres : [ 13, 17 ]
301
+ runtime : [ async-std, tokio ]
302
+ tls : [ native-tls, rustls-aws-lc-rs, rustls-ring ]
303
+ needs : check
304
+ timeout-minutes : 30
305
+ steps :
306
+ - uses : actions/checkout@v4
294
307
295
- - run : |
296
- docker stop postgres_${{ matrix.postgres }}
308
+ - name : Setup Rust
309
+ run : rustup show active-toolchain || rustup toolchain install
310
+
311
+ - uses : Swatinem/rust-cache@v2
297
312
298
313
- run : |
299
314
docker compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }}_client_ssl postgres_${{ matrix.postgres }}_client_ssl
315
+
316
+ - run : |
300
317
docker exec postgres_${{ matrix.postgres }}_client_ssl bash -c "until pg_isready; do sleep 1; done"
301
318
302
- - if : matrix.tls != 'none'
303
- run : >
319
+ - run : >
304
320
cargo test
305
321
--no-default-features
306
322
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
307
323
env:
308
324
DATABASE_URL: postgres://postgres@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=.%2Ftests%2Fcerts%2Fca.crt&sslkey=.%2Ftests%2Fcerts%2Fkeys%2Fclient.key&sslcert=.%2Ftests%2Fcerts%2Fclient.crt
309
- RUSTFLAGS : --cfg postgres_client_ssl
325
+ RUSTFLAGS: --cfg postgres="${{ matrix.postgres }}"
310
326
311
327
mysql :
312
328
name : MySQL
0 commit comments