Skip to content

Commit 12fb87e

Browse files
committed
test: add postgres 17 tests
1 parent 8877cea commit 12fb87e

8 files changed

Lines changed: 73 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ jobs:
4747
POSTGRES_USER: test_user
4848
POSTGRES_PASSWORD: password
4949
POSTGRES_PORT: 5432
50+
POSTGRES_17_HOST: 127.0.0.1
51+
POSTGRES_17_DB: test_db
52+
POSTGRES_17_USER: test_user
53+
POSTGRES_17_PASSWORD: password
54+
POSTGRES_17_PORT: 54317
5055
POSTGRES_16_HOST: 127.0.0.1
5156
POSTGRES_16_DB: test_db
5257
POSTGRES_16_USER: test_user
@@ -135,6 +140,19 @@ jobs:
135140
--health-interval 10s
136141
--health-timeout 5s
137142
--health-retries 5
143+
postgres-17:
144+
image: postgres:16
145+
env:
146+
POSTGRES_DB: ${{env.POSTGRES_17_DB}}
147+
POSTGRES_USER: ${{env.POSTGRES_17_USER}}
148+
POSTGRES_PASSWORD: ${{env.POSTGRES_17_PASSWORD}}
149+
ports:
150+
- 54317:5432
151+
options: >-
152+
--health-cmd pg_isready
153+
--health-interval 10s
154+
--health-timeout 5s
155+
--health-retries 5
138156
postgres-16:
139157
image: postgres:16
140158
env:
@@ -164,7 +182,7 @@ jobs:
164182
strategy:
165183
fail-fast: false
166184
matrix:
167-
version: [ "3.8","3.9","3.10","3.11","3.12","3.13" ]
185+
version: [ "3.8","3.9","3.10","3.11","3.12","3.13", "3.14" ]
168186
steps:
169187
- name: Checkout repository
170188
uses: actions/checkout@v3
@@ -236,6 +254,11 @@ jobs:
236254
-e POSTGRES_USER \
237255
-e POSTGRES_PORT \
238256
-e POSTGRES_PASSWORD \
257+
-e POSTGRES_17_HOST \
258+
-e POSTGRES_17_DB \
259+
-e POSTGRES_17_USER \
260+
-e POSTGRES_17_PORT \
261+
-e POSTGRES_17_PASSWORD \
239262
-e POSTGRES_16_HOST \
240263
-e POSTGRES_16_DB \
241264
-e POSTGRES_16_USER \

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ started.
2929

3030
## Features
3131

32-
- 🐍 Python 3.7 - 3.13
32+
- 🐍 Python 3.7 - 3.14
3333
- ⚡️ [`uv`](https://github.com/astral-sh/uv) preinstalled
3434
- 🏗️ Build dependencies preinstalled
3535
- 🔄 CI/CD ready
@@ -38,9 +38,6 @@ started.
3838
- 🐬 MySQL support
3939
- 🏢 MSSQL support (beta)
4040

41-
42-
[//]: # (out of the box mysql support)
43-
4441
## Compatibility
4542

4643
- 🟢 Supported/Tested
@@ -50,7 +47,8 @@ started.
5047

5148
| Python version | | uv preinstalled |
5249
|----------------|------------------------|:----------------|
53-
| `^3.13.0` | 🟢 | 🟢 (`^3.13.0`) |
50+
| `^3.14.3` | 🟢 | 🟢 |
51+
| `^3.13.0` | 🟢 | 🟢 |
5452
| `^3.12.4` | 🟢 | 🟢 (`^3.12.7`) |
5553
| `^3.11.2` | 🟢 | 🟢 (`^3.11.10`) |
5654
| `^3.10.10` | 🟢 | 🟢 (`^3.10.15`) |

tests/app_postgres_17/__init__.py

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated by Django 4.1.7 on 2023-03-14 13:46
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
initial = True
9+
10+
dependencies = [
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name='TestModel',
16+
fields=[
17+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18+
('value', models.IntegerField()),
19+
],
20+
),
21+
]

tests/app_postgres_17/migrations/__init__.py

Whitespace-only changes.

tests/app_postgres_17/models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from django.db import models
2+
3+
4+
# Create your models here.
5+
6+
7+
class TestModel(models.Model):
8+
value = models.IntegerField()

tests/app_postgres_17/router.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from django.conf import settings
2+
3+
from tests.base_db_router import BaseDBRouter
4+
5+
6+
class DBRouter(BaseDBRouter):
7+
route_app_labels = {"app_postgres_17"}
8+
db = settings.DB_POSTGRES_17

tests/app_postgres_17/tests.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from django.conf import settings
2+
from django.test import TestCase
3+
4+
5+
class Test(TestCase):
6+
databases = ['default', settings.DB_POSTGRES_16]
7+
8+
def test(self):
9+
self.assertTrue(True)

0 commit comments

Comments
 (0)