Skip to content

Commit e3562fe

Browse files
committed
refactor(ci): Use separate job for postgres ssl auth tests
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
1 parent 8c44ab8 commit e3562fe

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

.github/workflows/sqlx.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -292,26 +292,31 @@ jobs:
292292
SQLX_OFFLINE_DIR: .sqlx
293293
RUSTFLAGS: --cfg postgres="${{ matrix.postgres }}"
294294
295-
# client SSL authentication
296-
297-
- run: |
298-
docker compose -f tests/docker-compose.yml stop
295+
postgres-ssl-auth:
296+
name: Postgres
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
299307

300-
- run: |
301-
docker compose -f tests/docker-compose.yml rm -f
308+
- name: Setup Rust
309+
run: rustup show active-toolchain || rustup toolchain install
302310

303-
# Prevent Bind for 0.0.0.0:5432 failed: port is already allocated
304-
- run: |
305-
bash -c 'sleep 10'
311+
- uses: Swatinem/rust-cache@v2
306312

307313
- run: |
308314
docker compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }}_client_ssl postgres_${{ matrix.postgres }}_client_ssl
309315
310316
- run: |
311317
docker exec postgres_${{ matrix.postgres }}_client_ssl bash -c "until pg_isready; do sleep 1; done"
312318
313-
- if: matrix.tls != 'none'
314-
run: >
319+
- run: >
315320
cargo test
316321
--no-default-features
317322
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}

0 commit comments

Comments
 (0)