mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
chore: Fix warnings for custom postgres_## cfg flags (#3950)
* chore: Fix warnings for custom postgres_## cfg flags Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com> * pr feedback - reorder cfg allowance; enable test_pg_copy_chunked test Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com> * refactor(postgres): Remove two more deprecated cfg flag uses (from docstrings) Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com> * refactor(ci): Use separate job for postgres ssl auth tests Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com> --------- Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
This commit is contained in:
28
.github/workflows/sqlx.yml
vendored
28
.github/workflows/sqlx.yml
vendored
@@ -221,9 +221,7 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- env:
|
||||
# FIXME: needed to disable `ltree` tests in Postgres 9.6
|
||||
# but `PgLTree` should just fall back to text format
|
||||
RUSTFLAGS: -D warnings --cfg postgres_${{ matrix.postgres }}
|
||||
RUSTFLAGS: -D warnings --cfg postgres="${{ matrix.postgres }}"
|
||||
run: >
|
||||
cargo build
|
||||
--no-default-features
|
||||
@@ -245,9 +243,7 @@ jobs:
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx
|
||||
SQLX_OFFLINE_DIR: .sqlx
|
||||
# FIXME: needed to disable `ltree` tests in Postgres 9.6
|
||||
# but `PgLTree` should just fall back to text format
|
||||
RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}
|
||||
RUSTFLAGS: --cfg postgres="${{ matrix.postgres }}"
|
||||
|
||||
# Run the `test-attr` test again to cover cleanup.
|
||||
- run: >
|
||||
@@ -258,9 +254,7 @@ jobs:
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx
|
||||
SQLX_OFFLINE_DIR: .sqlx
|
||||
# FIXME: needed to disable `ltree` tests in Postgres 9.6
|
||||
# but `PgLTree` should just fall back to text format
|
||||
RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}
|
||||
RUSTFLAGS: --cfg postgres="${{ matrix.postgres }}"
|
||||
|
||||
- if: matrix.tls != 'none'
|
||||
run: >
|
||||
@@ -270,9 +264,7 @@ jobs:
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=.%2Ftests%2Fcerts%2Fca.crt
|
||||
SQLX_OFFLINE_DIR: .sqlx
|
||||
# FIXME: needed to disable `ltree` tests in Postgres 9.6
|
||||
# but `PgLTree` should just fall back to text format
|
||||
RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}
|
||||
RUSTFLAGS: --cfg postgres="${{ matrix.postgres }}"
|
||||
|
||||
# Remove test artifacts
|
||||
- run: cargo clean -p sqlx
|
||||
@@ -286,9 +278,7 @@ jobs:
|
||||
env:
|
||||
SQLX_OFFLINE: true
|
||||
SQLX_OFFLINE_DIR: .sqlx
|
||||
# FIXME: needed to disable `ltree` tests in Postgres 9.6
|
||||
# but `PgLTree` should just fall back to text format
|
||||
RUSTFLAGS: -D warnings --cfg postgres_${{ matrix.postgres }}
|
||||
RUSTFLAGS: -D warnings --cfg postgres="${{ matrix.postgres }}"
|
||||
|
||||
# Test macros in offline mode (still needs DATABASE_URL to run)
|
||||
- run: >
|
||||
@@ -300,9 +290,7 @@ jobs:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx
|
||||
SQLX_OFFLINE: true
|
||||
SQLX_OFFLINE_DIR: .sqlx
|
||||
# FIXME: needed to disable `ltree` tests in Postgres 9.6
|
||||
# but `PgLTree` should just fall back to text format
|
||||
RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}
|
||||
RUSTFLAGS: --cfg postgres="${{ matrix.postgres }}"
|
||||
|
||||
postgres-ssl-auth:
|
||||
name: Postgres SSL Auth
|
||||
@@ -334,9 +322,7 @@ jobs:
|
||||
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
|
||||
env:
|
||||
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
|
||||
# FIXME: needed to disable `ltree` tests in Postgres 9.6
|
||||
# but `PgLTree` should just fall back to text format
|
||||
RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}_client_ssl
|
||||
RUSTFLAGS: --cfg postgres="${{ matrix.postgres }}"
|
||||
|
||||
mysql:
|
||||
name: MySQL
|
||||
|
||||
Reference in New Issue
Block a user