Skip to content

Run tests against both psycopg2 and pyscopg3 #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ commands:
parameters:
pyversion:
type: integer
djversions:
type: string

steps:
- run:
name: Run tests
command: tox -e 'py<< parameters.pyversion >>-dj{<< parameters.djversions >>}'
command: tox --listenvs | grep ^py<< parameters.pyversion >> | circleci tests split | xargs -n 1 tox -e
environment:
DATABASE_URL: 'postgres://psqlextra:psqlextra@localhost:5432/psqlextra'

Expand All @@ -53,7 +51,6 @@ jobs:
extra: test
- run-tests:
pyversion: 36
djversions: 20,21,22,30,31,32

test-python37:
executor:
Expand All @@ -65,7 +62,6 @@ jobs:
extra: test
- run-tests:
pyversion: 37
djversions: 20,21,22,30,31,32

test-python38:
executor:
Expand All @@ -77,7 +73,6 @@ jobs:
extra: test
- run-tests:
pyversion: 38
djversions: 20,21,22,30,31,32,40,41,42

test-python39:
executor:
Expand All @@ -89,7 +84,6 @@ jobs:
extra: test
- run-tests:
pyversion: 39
djversions: 21,22,30,31,32,40,41,42

test-python310:
executor:
Expand All @@ -101,7 +95,17 @@ jobs:
extra: test
- run-tests:
pyversion: 310
djversions: 21,22,30,31,32,40,41,42

test-python311:
executor:
name: python
version: "3.11"
steps:
- checkout
- install-dependencies:
extra: test
- run-tests:
pyversion: 311
- store_test_results:
path: reports
- run:
Expand Down Expand Up @@ -178,6 +182,12 @@ workflows:
only: /.*/
branches:
only: /.*/
- test-python311:
filters:
tags:
only: /.*/
branches:
only: /.*/
- analysis:
filters:
tags:
Expand All @@ -191,6 +201,7 @@ workflows:
- test-python38
- test-python39
- test-python310
- test-python311
- analysis
filters:
tags:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
| :memo: | **License** | [![License](https://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org) |
| :package: | **PyPi** | [![PyPi](https://badge.fury.io/py/django-postgres-extra.svg)](https://pypi.python.org/pypi/django-postgres-extra) |
| :four_leaf_clover: | **Code coverage** | [![Coverage Status](https://coveralls.io/repos/github/SectorLabs/django-postgres-extra/badge.svg?branch=coveralls)](https://coveralls.io/github/SectorLabs/django-postgres-extra?branch=master) |
| <img src="https://cdn.iconscout.com/icon/free/png-256/django-1-282754.png" width="22px" height="22px" align="center" /> | **Django Versions** | 2.0, 2.1, 2.2, 3.0, 3.1, 3.2, 4.0, 4.1 |
| <img src="http://www.iconarchive.com/download/i73027/cornmanthe3rd/plex/Other-python.ico" width="22px" height="22px" align="center" /> | **Python Versions** | 3.6, 3.7, 3.8, 3.9, 3.10 |
| <img src="https://cdn.iconscout.com/icon/free/png-256/django-1-282754.png" width="22px" height="22px" align="center" /> | **Django Versions** | 2.0, 2.1, 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2 |
| <img src="https://cdn3.iconfinder.com/data/icons/logos-and-brands-adobe/512/267_Python-512.png" width="22px" height="22px" align="center" /> | **Python Versions** | 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 |
| <img src="https://pbs.twimg.com/profile_images/1152122059/psycopg-100_400x400.png" width="22px" height="22px" align="center" /> | **Psycopg Versions** | 2, 3 |
| :book: | **Documentation** | [Read The Docs](https://django-postgres-extra.readthedocs.io/en/master/) |
| :warning: | **Upgrade** | [Upgrade from v1.x](https://django-postgres-extra.readthedocs.io/en/master/major_releases.html#new-features)
| :checkered_flag: | **Installation** | [Installation Guide](https://django-postgres-extra.readthedocs.io/en/master/installation.html) |
Expand Down
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ def run(self):
"build==0.7.0",
"twine==3.7.1",
],
"psycopg3": [
"django>=4.2,<5.0",
"psycopg[binary]>=3.0.0",
],
},
cmdclass={
"lint": create_command(
Expand Down
11 changes: 9 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[tox]
envlist = py36-dj{20,21,22,30,31,32}, py37-dj{20,21,22,30,31,32}, py38-dj{20,21,22,30,31,32,40,41,42}, py39-dj{21,22,30,31,32,40,41,42}, py310-dj{21,22,30,31,32,40,41,42}
envlist =
{py36,py37}-dj{20,21,22,30,31,32}-psycopg{28,29}
{py38,py39,py310}-dj{21,22,30,31,32,40}-psycopg{28,29}
{py38,py39,py310,py311}-dj{41}-psycopg{28,29}
{py38,py39,py310,py311}-dj{42}-psycopg{28,29,31}

[testenv]
deps =
Expand All @@ -11,7 +15,10 @@ deps =
dj32: Django~=3.2.0
dj40: Django~=4.0.0
dj41: Django~=4.1.0
dj42: .[psycopg3]
dj42: Django~=4.2.0
psycopg28: psycopg2[binary]~=2.8
psycopg29: psycopg2[binary]~=2.9
psycopg31: psycopg[binary]~=3.1
.[test]
setenv =
DJANGO_SETTINGS_MODULE=settings
Expand Down