Skip to content

refactor(ci): Use separate job for postgres ssl auth tests #3977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/sqlx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ jobs:

- run: |
docker compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }} postgres_${{ matrix.postgres }}

- run: |
docker exec postgres_${{ matrix.postgres }} bash -c "until pg_isready; do sleep 1; done"

# Create data dir for offline mode
Expand Down Expand Up @@ -302,15 +304,31 @@ jobs:
# but `PgLTree` should just fall back to text format
RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}

# client SSL authentication
postgres-ssl-auth:
name: Postgres SSL Auth
runs-on: ubuntu-24.04
strategy:
matrix:
postgres: [ 13, 17 ]
runtime: [ async-std, tokio ]
tls: [ native-tls, rustls-aws-lc-rs, rustls-ring ]
needs: check
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

- name: Setup Rust
run: rustup show active-toolchain || rustup toolchain install

- uses: Swatinem/rust-cache@v2

- run: |
docker stop postgres_${{ matrix.postgres }}
docker compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }}_client_ssl postgres_${{ matrix.postgres }}_client_ssl

- run: |
docker exec postgres_${{ matrix.postgres }}_client_ssl bash -c "until pg_isready; do sleep 1; done"

- if: matrix.tls != 'none'
run: >
- run: >
cargo test
--no-default-features
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
Expand Down
2 changes: 0 additions & 2 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:
#
# MySQL 8.x, 5.7.x
Expand Down
Loading