Skip to content

Commit b3c8e58

Browse files
jneightJavier Cordero
andauthored
new version 4.0.6 (#88)
* new version 4.0.6 * Added tests for pg3 postgis --------- Co-authored-by: Javier Cordero <github@j2i.me>
1 parent e8eb90a commit b3c8e58

File tree

5 files changed

+171
-6
lines changed

5 files changed

+171
-6
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI-psycopg2-gis
2+
'on':
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
build:
11+
env:
12+
POSTGRES_USER: postgres
13+
PGPASSWORD: postgres
14+
runs-on: '${{ matrix.os }}'
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
python-version: '3.8'
20+
django-version: '3.2.23'
21+
- os: ubuntu-latest
22+
python-version: '3.9'
23+
django-version: '3.2.23'
24+
- os: ubuntu-latest
25+
python-version: '3.10'
26+
django-version: '3.2.23'
27+
- os: ubuntu-latest
28+
python-version: '3.8'
29+
django-version: '4.2.9'
30+
- os: ubuntu-latest
31+
python-version: '3.9'
32+
django-version: '4.2.9'
33+
- os: ubuntu-latest
34+
python-version: '3.10'
35+
django-version: '4.2.9'
36+
- os: ubuntu-latest
37+
python-version: '3.11'
38+
django-version: '4.2.9'
39+
- os: ubuntu-latest
40+
python-version: '3.12'
41+
django-version: '4.2.9'
42+
services:
43+
postgres:
44+
image: postgis/postgis
45+
env:
46+
POSTGRES_USER: postgres
47+
POSTGRES_PASSWORD: postgres
48+
options: >-
49+
--health-cmd pg_isready
50+
--health-interval 10s
51+
--health-timeout 5s
52+
--health-retries 5
53+
ports:
54+
- 5432:5432
55+
steps:
56+
- name: 'Set up Python ${{ matrix.python-version }}'
57+
uses: actions/setup-python@v5
58+
with:
59+
python-version: '${{ matrix.python-version }}'
60+
- uses: actions/checkout@v4
61+
- run: sudo apt-get install gdal-bin libgdal-dev
62+
- run: pip install django==${{ matrix.django-version}}
63+
- run: pip install psycopg2
64+
- run: pip install psycogreen
65+
- run: pip install gevent
66+
- run: pip install gdal==3.4.1
67+
- run: pip install .
68+
- run: python runtests_psycopg2_gis.py
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI-psycopg3-gis
2+
'on':
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
build:
11+
env:
12+
POSTGRES_USER: postgres
13+
PGPASSWORD: postgres
14+
runs-on: '${{ matrix.os }}'
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
python-version: '3.8'
20+
django-version: '4.2.9'
21+
- os: ubuntu-latest
22+
python-version: '3.9'
23+
django-version: '4.2.9'
24+
- os: ubuntu-latest
25+
python-version: '3.10'
26+
django-version: '4.2.9'
27+
- os: ubuntu-latest
28+
python-version: '3.11'
29+
django-version: '4.2.9'
30+
- os: ubuntu-latest
31+
python-version: '3.12'
32+
django-version: '4.2.9'
33+
services:
34+
postgres:
35+
image: postgis/postgis
36+
env:
37+
POSTGRES_USER: postgres
38+
POSTGRES_PASSWORD: postgres
39+
options: >-
40+
--health-cmd pg_isready
41+
--health-interval 10s
42+
--health-timeout 5s
43+
--health-retries 5
44+
ports:
45+
- 5432:5432
46+
steps:
47+
- name: 'Set up Python ${{ matrix.python-version }}'
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version: '${{ matrix.python-version }}'
51+
- uses: actions/checkout@v4
52+
- run: sudo apt-get install gdal-bin libgdal-dev
53+
- run: pip install django==${{ matrix.django-version}}
54+
- run: pip install psycopg[binary]
55+
- run: pip install gevent
56+
- run: pip install gdal==3.4.1
57+
- run: pip install .
58+
- run: python runtests_psycopg3_gis.py

django_db_geventpool/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = 'v4.0.5'
1+
version = 'v4.0.6'

runtests_psycopg3_gis.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env python
2+
import sys
3+
import gevent.monkey
4+
5+
gevent.monkey.patch_all()
6+
7+
import django
8+
from django.conf import settings
9+
from django.test.runner import DiscoverRunner
10+
11+
12+
settings.configure(
13+
DEBUG=True,
14+
DATABASES={
15+
"default": {
16+
"ENGINE": "django_db_geventpool.backends.postgis",
17+
"NAME": "test",
18+
"USER": "postgres",
19+
"PASSWORD": "postgres",
20+
"ATOMIC_REQUESTS": False,
21+
"CONN_MAX_AGE": 0,
22+
"HOST": "localhost",
23+
}
24+
},
25+
INSTALLED_APPS=(
26+
"tests",
27+
"django_db_geventpool",
28+
),
29+
USE_TZ=True,
30+
)
31+
django.setup()
32+
33+
test_runner = DiscoverRunner(verbosity=2)
34+
35+
failures = test_runner.run_tests(["tests"])
36+
if failures:
37+
sys.exit(failures)

tox.ini

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ python =
88

99
[tox]
1010
envlist =
11-
py3{8,9,10,11,12}-dj{32,42}-pg{is,2}
12-
py3{8,9,10,11,12}-dj{42}-pg{3}
13-
py3{10,11,12}-dj{50}-pg{is,2,3}
11+
py3{8,9,10,11,12}-dj{32,42}-pg{2-gis,2}
12+
py3{8,9,10,11,12}-dj{42}-pg{3-gis,3}
13+
py3{10,11,12}-dj{50}-pg{2-gis,2,3-gis,3}
1414

1515
[testenv]
1616
deps =
@@ -19,11 +19,13 @@ deps =
1919
dj32: django~=3.2
2020
dj42: django~=4.2
2121
dj50: django~=5.0
22-
pgis: psycopg2-binary
22+
pg2-gis: psycopg2-binary
2323
pg2: psycopg2-binary
24+
pg3-gis: psycopg[binary,pool]
2425
pg3: psycopg[binary,pool]
2526

2627
commands =
27-
pgis: python -Wall runtests_psycopg2_gis.py
28+
pg2-gis: python -Wall runtests_psycopg2_gis.py
2829
pg2: python -Wall runtests_psycopg2.py
30+
pg3-gis:python -Wall runtests_psycopg3_gis.py
2931
pg3: python -Wall runtests_psycopg3.py

0 commit comments

Comments
 (0)