mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-04 00:05:27 +00:00
Start testing on Postgres 15 and drop Postgres 10 (#2193)
* CHANGELOG: mention that users should upgrade CLI * Drop postgres 10 start testing postgres 15 --------- Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
This commit is contained in:
parent
0534c9da81
commit
171b00de2e
2
.github/workflows/sqlx.yml
vendored
2
.github/workflows/sqlx.yml
vendored
@ -176,7 +176,7 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
postgres: [14, 10]
|
postgres: [15, 11]
|
||||||
runtime: [async-std, tokio]
|
runtime: [async-std, tokio]
|
||||||
tls: [native-tls, rustls, none]
|
tls: [native-tls, rustls, none]
|
||||||
needs: check
|
needs: check
|
||||||
|
@ -15,7 +15,7 @@ use std::ops::{Deref, DerefMut};
|
|||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # use sqlx::{Acquire, postgres::Postgres, error::BoxDynError};
|
/// # use sqlx::{Acquire, postgres::Postgres, error::BoxDynError};
|
||||||
/// # #[cfg(any(postgres_9_6, postgres_14))]
|
/// # #[cfg(any(postgres_9_6, postgres_15))]
|
||||||
/// async fn run_query<'a, A>(conn: A) -> Result<(), BoxDynError>
|
/// async fn run_query<'a, A>(conn: A) -> Result<(), BoxDynError>
|
||||||
/// where
|
/// where
|
||||||
/// A: Acquire<'a, Database = Postgres>,
|
/// A: Acquire<'a, Database = Postgres>,
|
||||||
@ -35,7 +35,7 @@ use std::ops::{Deref, DerefMut};
|
|||||||
/// ```rust
|
/// ```rust
|
||||||
/// # use std::future::Future;
|
/// # use std::future::Future;
|
||||||
/// # use sqlx::{Acquire, postgres::Postgres, error::BoxDynError};
|
/// # use sqlx::{Acquire, postgres::Postgres, error::BoxDynError};
|
||||||
/// # #[cfg(any(postgres_9_6, postgres_14))]
|
/// # #[cfg(any(postgres_9_6, postgres_15))]
|
||||||
/// fn run_query<'a, 'c, A>(conn: A) -> impl Future<Output = Result<(), BoxDynError>> + Send + 'a
|
/// fn run_query<'a, 'c, A>(conn: A) -> impl Future<Output = Result<(), BoxDynError>> + Send + 'a
|
||||||
/// where
|
/// where
|
||||||
/// A: Acquire<'c, Database = Postgres> + Send + 'a,
|
/// A: Acquire<'c, Database = Postgres> + Send + 'a,
|
||||||
@ -57,7 +57,7 @@ use std::ops::{Deref, DerefMut};
|
|||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # use sqlx::{postgres::PgConnection, error::BoxDynError};
|
/// # use sqlx::{postgres::PgConnection, error::BoxDynError};
|
||||||
/// # #[cfg(any(postgres_9_6, postgres_14))]
|
/// # #[cfg(any(postgres_9_6, postgres_15))]
|
||||||
/// async fn run_query(conn: &mut PgConnection) -> Result<(), BoxDynError> {
|
/// async fn run_query(conn: &mut PgConnection) -> Result<(), BoxDynError> {
|
||||||
/// sqlx::query!("SELECT 1 as v").fetch_one(&mut *conn).await?;
|
/// sqlx::query!("SELECT 1 as v").fetch_one(&mut *conn).await?;
|
||||||
/// sqlx::query!("SELECT 2 as v").fetch_one(&mut *conn).await?;
|
/// sqlx::query!("SELECT 2 as v").fetch_one(&mut *conn).await?;
|
||||||
|
@ -75,10 +75,29 @@ services:
|
|||||||
MYSQL_DATABASE: sqlx
|
MYSQL_DATABASE: sqlx
|
||||||
|
|
||||||
#
|
#
|
||||||
# PostgreSQL 14.x, 13.x, 12.x, 11.x 10.x
|
# PostgreSQL 15.x, 14.x, 13.x, 12.x, 11.x
|
||||||
# https://www.postgresql.org/support/versioning/
|
# https://www.postgresql.org/support/versioning/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
postgres_15:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: postgres/Dockerfile
|
||||||
|
args:
|
||||||
|
VERSION: 15
|
||||||
|
ports:
|
||||||
|
- 5432
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: sqlx
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: password
|
||||||
|
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
|
||||||
|
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
|
||||||
|
volumes:
|
||||||
|
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
|
||||||
|
command: >
|
||||||
|
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
|
||||||
|
|
||||||
postgres_14:
|
postgres_14:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@ -154,22 +173,3 @@ services:
|
|||||||
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
|
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
|
||||||
command: >
|
command: >
|
||||||
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
|
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
|
||||||
|
|
||||||
postgres_10:
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: postgres/Dockerfile
|
|
||||||
args:
|
|
||||||
VERSION: 10
|
|
||||||
ports:
|
|
||||||
- 5432
|
|
||||||
environment:
|
|
||||||
POSTGRES_DB: sqlx
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: password
|
|
||||||
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
|
|
||||||
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
|
|
||||||
volumes:
|
|
||||||
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
|
|
||||||
command: >
|
|
||||||
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
|
|
||||||
|
@ -549,7 +549,7 @@ test_prepared_type!(money_vec<Vec<PgMoney>>(Postgres,
|
|||||||
|
|
||||||
// FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
|
// FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
|
||||||
// but `PgLTree` should just fall back to text format
|
// but `PgLTree` should just fall back to text format
|
||||||
#[cfg(postgres_14)]
|
#[cfg(any(postgres_14, postgres_15))]
|
||||||
test_type!(ltree<sqlx::postgres::types::PgLTree>(Postgres,
|
test_type!(ltree<sqlx::postgres::types::PgLTree>(Postgres,
|
||||||
"'Foo.Bar.Baz.Quux'::ltree" == sqlx::postgres::types::PgLTree::from_str("Foo.Bar.Baz.Quux").unwrap(),
|
"'Foo.Bar.Baz.Quux'::ltree" == sqlx::postgres::types::PgLTree::from_str("Foo.Bar.Baz.Quux").unwrap(),
|
||||||
"'Alpha.Beta.Delta.Gamma'::ltree" == sqlx::postgres::types::PgLTree::from_iter(["Alpha", "Beta", "Delta", "Gamma"]).unwrap(),
|
"'Alpha.Beta.Delta.Gamma'::ltree" == sqlx::postgres::types::PgLTree::from_iter(["Alpha", "Beta", "Delta", "Gamma"]).unwrap(),
|
||||||
@ -557,7 +557,7 @@ test_type!(ltree<sqlx::postgres::types::PgLTree>(Postgres,
|
|||||||
|
|
||||||
// FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
|
// FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
|
||||||
// but `PgLTree` should just fall back to text format
|
// but `PgLTree` should just fall back to text format
|
||||||
#[cfg(postgres_14)]
|
#[cfg(any(postgres_14, postgres_15))]
|
||||||
test_type!(ltree_vec<Vec<sqlx::postgres::types::PgLTree>>(Postgres,
|
test_type!(ltree_vec<Vec<sqlx::postgres::types::PgLTree>>(Postgres,
|
||||||
"array['Foo.Bar.Baz.Quux', 'Alpha.Beta.Delta.Gamma']::ltree[]" ==
|
"array['Foo.Bar.Baz.Quux', 'Alpha.Beta.Delta.Gamma']::ltree[]" ==
|
||||||
vec![
|
vec![
|
||||||
|
@ -169,7 +169,7 @@ for runtime in ["async-std", "tokio"]:
|
|||||||
# postgres
|
# postgres
|
||||||
#
|
#
|
||||||
|
|
||||||
for version in ["14", "13", "12", "11", "10"]:
|
for version in ["15", "14", "13", "12", "11"]:
|
||||||
run(
|
run(
|
||||||
f"cargo test --no-default-features --features macros,any,unstable-all-types,postgres,runtime-{runtime},tls-{tls}",
|
f"cargo test --no-default-features --features macros,any,unstable-all-types,postgres,runtime-{runtime},tls-{tls}",
|
||||||
comment=f"test postgres {version}",
|
comment=f"test postgres {version}",
|
||||||
@ -178,7 +178,7 @@ for runtime in ["async-std", "tokio"]:
|
|||||||
)
|
)
|
||||||
|
|
||||||
## +ssl
|
## +ssl
|
||||||
for version in ["14", "13", "12", "11", "10"]:
|
for version in ["15", "14", "13", "12", "11"]:
|
||||||
run(
|
run(
|
||||||
f"cargo test --no-default-features --features macros,any,_unstable-all-types,postgres,runtime-{runtime},tls-{tls}",
|
f"cargo test --no-default-features --features macros,any,_unstable-all-types,postgres,runtime-{runtime},tls-{tls}",
|
||||||
comment=f"test postgres {version} ssl",
|
comment=f"test postgres {version} ssl",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user