Skip to content

Commit cc79a77

Browse files
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>
1 parent 70bc55d commit cc79a77

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

.github/workflows/sqlx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
runs-on: ubuntu-20.04
177177
strategy:
178178
matrix:
179-
postgres: [14, 10]
179+
postgres: [15, 11]
180180
runtime: [async-std, tokio]
181181
tls: [native-tls, rustls, none]
182182
needs: check

sqlx-core/src/acquire.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::ops::{Deref, DerefMut};
1515
///
1616
/// ```rust
1717
/// # use sqlx::{Acquire, postgres::Postgres, error::BoxDynError};
18-
/// # #[cfg(any(postgres_9_6, postgres_14))]
18+
/// # #[cfg(any(postgres_9_6, postgres_15))]
1919
/// async fn run_query<'a, A>(conn: A) -> Result<(), BoxDynError>
2020
/// where
2121
/// A: Acquire<'a, Database = Postgres>,
@@ -35,7 +35,7 @@ use std::ops::{Deref, DerefMut};
3535
/// ```rust
3636
/// # use std::future::Future;
3737
/// # use sqlx::{Acquire, postgres::Postgres, error::BoxDynError};
38-
/// # #[cfg(any(postgres_9_6, postgres_14))]
38+
/// # #[cfg(any(postgres_9_6, postgres_15))]
3939
/// fn run_query<'a, 'c, A>(conn: A) -> impl Future<Output = Result<(), BoxDynError>> + Send + 'a
4040
/// where
4141
/// A: Acquire<'c, Database = Postgres> + Send + 'a,
@@ -57,7 +57,7 @@ use std::ops::{Deref, DerefMut};
5757
///
5858
/// ```rust
5959
/// # use sqlx::{postgres::PgConnection, error::BoxDynError};
60-
/// # #[cfg(any(postgres_9_6, postgres_14))]
60+
/// # #[cfg(any(postgres_9_6, postgres_15))]
6161
/// async fn run_query(conn: &mut PgConnection) -> Result<(), BoxDynError> {
6262
/// sqlx::query!("SELECT 1 as v").fetch_one(&mut *conn).await?;
6363
/// sqlx::query!("SELECT 2 as v").fetch_one(&mut *conn).await?;

tests/docker-compose.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ services:
7575
MYSQL_DATABASE: sqlx
7676

7777
#
78-
# PostgreSQL 14.x, 13.x, 12.x, 11.x 10.x
78+
# PostgreSQL 15.x, 14.x, 13.x, 12.x, 11.x
7979
# https://www.postgresql.org/support/versioning/
8080
#
8181

82-
postgres_14:
82+
postgres_15:
8383
build:
8484
context: .
8585
dockerfile: postgres/Dockerfile
8686
args:
87-
VERSION: 14
87+
VERSION: 15
8888
ports:
8989
- 5432
9090
environment:
@@ -98,12 +98,12 @@ services:
9898
command: >
9999
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
100100
101-
postgres_13:
101+
postgres_14:
102102
build:
103103
context: .
104104
dockerfile: postgres/Dockerfile
105105
args:
106-
VERSION: 13
106+
VERSION: 14
107107
ports:
108108
- 5432
109109
environment:
@@ -117,12 +117,12 @@ services:
117117
command: >
118118
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
119119
120-
postgres_12:
120+
postgres_13:
121121
build:
122122
context: .
123123
dockerfile: postgres/Dockerfile
124124
args:
125-
VERSION: 12
125+
VERSION: 13
126126
ports:
127127
- 5432
128128
environment:
@@ -136,14 +136,14 @@ services:
136136
command: >
137137
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
138138
139-
postgres_11:
139+
postgres_12:
140140
build:
141141
context: .
142142
dockerfile: postgres/Dockerfile
143143
args:
144-
VERSION: 11
144+
VERSION: 12
145145
ports:
146-
- 5432
146+
- 5432
147147
environment:
148148
POSTGRES_DB: sqlx
149149
POSTGRES_USER: postgres
@@ -155,12 +155,12 @@ services:
155155
command: >
156156
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
157157
158-
postgres_10:
158+
postgres_11:
159159
build:
160160
context: .
161161
dockerfile: postgres/Dockerfile
162162
args:
163-
VERSION: 10
163+
VERSION: 11
164164
ports:
165165
- 5432
166166
environment:

tests/postgres/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,15 +549,15 @@ test_prepared_type!(money_vec<Vec<PgMoney>>(Postgres,
549549

550550
// FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
551551
// but `PgLTree` should just fall back to text format
552-
#[cfg(postgres_14)]
552+
#[cfg(any(postgres_14, postgres_15))]
553553
test_type!(ltree<sqlx::postgres::types::PgLTree>(Postgres,
554554
"'Foo.Bar.Baz.Quux'::ltree" == sqlx::postgres::types::PgLTree::from_str("Foo.Bar.Baz.Quux").unwrap(),
555555
"'Alpha.Beta.Delta.Gamma'::ltree" == sqlx::postgres::types::PgLTree::from_iter(["Alpha", "Beta", "Delta", "Gamma"]).unwrap(),
556556
));
557557

558558
// FIXME: needed to disable `ltree` tests in version that don't have a binary format for it
559559
// but `PgLTree` should just fall back to text format
560-
#[cfg(postgres_14)]
560+
#[cfg(any(postgres_14, postgres_15))]
561561
test_type!(ltree_vec<Vec<sqlx::postgres::types::PgLTree>>(Postgres,
562562
"array['Foo.Bar.Baz.Quux', 'Alpha.Beta.Delta.Gamma']::ltree[]" ==
563563
vec![

tests/x.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def run(command, comment=None, env=None, service=None, tag=None, args=None, data
169169
# postgres
170170
#
171171

172-
for version in ["14", "13", "12", "11", "10"]:
172+
for version in ["15", "14", "13", "12", "11"]:
173173
run(
174174
f"cargo test --no-default-features --features macros,any,unstable-all-types,postgres,runtime-{runtime},tls-{tls}",
175175
comment=f"test postgres {version}",
@@ -178,7 +178,7 @@ def run(command, comment=None, env=None, service=None, tag=None, args=None, data
178178
)
179179

180180
## +ssl
181-
for version in ["14", "13", "12", "11", "10"]:
181+
for version in ["15", "14", "13", "12", "11"]:
182182
run(
183183
f"cargo test --no-default-features --features macros,any,_unstable-all-types,postgres,runtime-{runtime},tls-{tls}",
184184
comment=f"test postgres {version} ssl",

0 commit comments

Comments
 (0)