Skip to content

Commit

Permalink
CI: run SSL tests only when building with TLS support
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibsG committed Feb 12, 2023
1 parent d32139b commit 961b566
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/sqlx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ jobs:
docker exec postgres_${{ matrix.postgres }}_client_ssl bash -c "until pg_isready; do sleep 1; done"
- uses: actions-rs/cargo@v1
if: matrix.tls != 'none'
with:
command: test
args: >
Expand Down Expand Up @@ -313,7 +314,7 @@ jobs:
# MySQL 5.7 supports TLS but not TLSv1.3 as required by RusTLS.
- uses: actions-rs/cargo@v1
if: ${{ !(matrix.mysql == '5_7' && matrix.tls == 'rustls') }}
if: ${{ matrix.mysql != '5_7' || matrix.tls == 'native-tls') }}
with:
command: test
args: >
Expand Down Expand Up @@ -372,6 +373,7 @@ jobs:
sleep 60
- uses: actions-rs/cargo@v1
if: matrix.tls != 'none'
with:
command: test
args: >
Expand Down
6 changes: 0 additions & 6 deletions tests/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ def start_database(driver, database, cwd):
elif driver.startswith("postgres"):
port = 5432

elif driver.startswith("mssql"):
port = 1433

else:
raise NotImplementedError

Expand Down Expand Up @@ -80,8 +77,5 @@ def start_database(driver, database, cwd):
elif driver.startswith("postgres"):
return f"postgres://postgres{password}@localhost:{port}/{database}"

elif driver.startswith("mssql"):
return f"mssql://sa:Password123!@127.0.0.1:{port}/{database}"

else:
raise NotImplementedError

0 comments on commit 961b566

Please sign in to comment.