]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci: test gevent integration 688/head
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 30 Nov 2023 10:23:27 +0000 (11:23 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 1 Dec 2023 12:57:08 +0000 (13:57 +0100)
.github/workflows/tests.yml
tests/conftest.py
tests/test_gevent.py

index 690c9e98e5295e678c1ae2688d61437ade5056ab..a1195fe27ef2c7a4828309c0a51e4d69d9ae45b8 100644 (file)
@@ -38,6 +38,8 @@ jobs:
           - {impl: c, python: "3.11", postgres: "postgres:12", libpq: oldest}
           - {impl: c, python: "3.12", postgres: "postgres:11", libpq: newest}
 
+          - {impl: python, python: "3.8", ext: gevent, postgres: "postgres:16"}
+          - {impl: c, python: "3.12", ext: gevent, postgres: "postgres:14"}
           - {impl: python, python: "3.9", ext: dns, postgres: "postgres:14"}
           - {impl: python, python: "3.9", ext: postgis, postgres: "postgis/postgis"}
           - {impl: python, python: "3.10", ext: numpy, postgres: "postgres:14"}
@@ -76,6 +78,12 @@ jobs:
         run: |
           echo "DEPS=$DEPS ./psycopg_c" >> $GITHUB_ENV
 
+      - name: Include gevent to the packages to install
+        if: ${{ matrix.ext == 'gevent' }}
+        run: |
+          echo "DEPS=$DEPS gevent" >> $GITHUB_ENV
+          echo "MARKERS=$MARKERS gevent" >> $GITHUB_ENV
+
       - name: Include dnspython to the packages to install
         if: ${{ matrix.ext == 'dns' }}
         run: |
@@ -96,7 +104,7 @@ jobs:
       - name: Configure to use the oldest dependencies
         if: ${{ matrix.ext == 'min' }}
         run: |
-          echo "DEPS=$DEPS dnspython shapely numpy" >> $GITHUB_ENV
+          echo "DEPS=$DEPS dnspython shapely numpy gevent" >> $GITHUB_ENV
           echo "PIP_CONSTRAINT=${{ github.workspace }}/tests/constraints.txt" \
             >> $GITHUB_ENV
 
index 05d79f9990db44352e75afb8ca0053e922532cef..8438fc6c6b3149ae8cc66d60228391f6919a68a7 100644 (file)
@@ -25,6 +25,7 @@ def pytest_configure(config):
         # catch the exception for my life.
         "subprocess: the test import psycopg after subprocess",
         "timing: the test is timing based and can fail on cheese hardware",
+        "gevent: the test requires the gevent module to be installed",
         "dns: the test requires dnspython to run",
         "postgis: the test requires the PostGIS extension to run",
         "numpy: the test requires numpy module to be installed",
index 99027aee34e9a7c83599f19131b52ea18955de15..befbeb21943bae254a0be7bbc45974015f43891a 100644 (file)
@@ -7,6 +7,8 @@ import psycopg
 
 pytest.importorskip("gevent")
 
+pytestmark = [pytest.mark.gevent]
+
 
 @pytest.mark.slow
 @pytest.mark.timing