Skip to content

Commit a096548

Browse files
authored
refactor(ci): Use separate job for postgres ssl auth tests (#3977)
Signed-off-by: Joshua Potts <[email protected]>
1 parent 5f8fc6b commit a096548

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

.github/workflows/sqlx.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ jobs:
231231
232232
- run: |
233233
docker compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }} postgres_${{ matrix.postgres }}
234+
235+
- run: |
234236
docker exec postgres_${{ matrix.postgres }} bash -c "until pg_isready; do sleep 1; done"
235237
236238
# Create data dir for offline mode
@@ -302,15 +304,31 @@ jobs:
302304
# but `PgLTree` should just fall back to text format
303305
RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}
304306
305-
# client SSL authentication
307+
postgres-ssl-auth:
308+
name: Postgres SSL Auth
309+
runs-on: ubuntu-24.04
310+
strategy:
311+
matrix:
312+
postgres: [ 13, 17 ]
313+
runtime: [ async-std, tokio ]
314+
tls: [ native-tls, rustls-aws-lc-rs, rustls-ring ]
315+
needs: check
316+
timeout-minutes: 30
317+
steps:
318+
- uses: actions/checkout@v4
319+
320+
- name: Setup Rust
321+
run: rustup show active-toolchain || rustup toolchain install
322+
323+
- uses: Swatinem/rust-cache@v2
306324

307325
- run: |
308-
docker stop postgres_${{ matrix.postgres }}
309326
docker compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }}_client_ssl postgres_${{ matrix.postgres }}_client_ssl
327+
328+
- run: |
310329
docker exec postgres_${{ matrix.postgres }}_client_ssl bash -c "until pg_isready; do sleep 1; done"
311330
312-
- if: matrix.tls != 'none'
313-
run: >
331+
- run: >
314332
cargo test
315333
--no-default-features
316334
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}

tests/docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3"
2-
31
services:
42
#
53
# MySQL 8.x, 5.7.x

0 commit comments

Comments
 (0)