]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci: include a single test with the oldest dependencies versions
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 31 Dec 2022 03:07:39 +0000 (03:07 +0000)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 2 Jan 2023 02:09:13 +0000 (02:09 +0000)
.github/workflows/tests.yml

index 94505cedb3d60a4bc99285de0df0b17b13661fbd..e9ee92d8075e0f5f833c25e3d4b0e40ae87ab125 100644 (file)
@@ -41,15 +41,15 @@ jobs:
           - {impl: python, python: "3.9", ext: dns, postgres: "postgres:14"}
           - {impl: python, python: "3.9", ext: postgis, postgres: "postgis/postgis"}
 
+          # Test with minimum dependencies versions
+          - {impl: c, python: "3.7", ext: min, postgres: "postgres:15"}
+
     env:
       PSYCOPG_IMPL: ${{ matrix.impl }}
       DEPS: ./psycopg[test] ./psycopg_pool
       PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres password=password"
       MARKERS: ""
 
-      # Enable to run tests using the minimum version of dependencies.
-      # PIP_CONSTRAINT: ${{ github.workspace }}/tests/constraints.txt
-
     steps:
       - uses: actions/checkout@v3
 
@@ -86,6 +86,13 @@ jobs:
           echo "DEPS=$DEPS shapely" >> $GITHUB_ENV
           echo "MARKERS=$MARKERS postgis" >> $GITHUB_ENV
 
+      - name: Configure to use the oldest dependencies
+        if: ${{ matrix.ext == 'min' }}
+        run: |
+          echo "DEPS=$DEPS dnspython shapely" >> $GITHUB_ENV
+          echo "PIP_CONSTRAINT=${{ github.workspace }}/tests/constraints.txt" \
+            >> $GITHUB_ENV
+
       - name: Install Python packages
         run: pip install $DEPS
 
@@ -123,9 +130,6 @@ jobs:
       # pproxy-based tests fail too, with the proxy not coming up in 2s.
       NOT_MARKERS: "timing proxy mypy"
 
-      # Enable to run tests using the minimum version of dependencies.
-      # PIP_CONSTRAINT: ${{ github.workspace }}/tests/constraints.txt
-
     steps:
       - uses: actions/checkout@v3
 
@@ -179,9 +183,6 @@ jobs:
       # On windows pproxy doesn't seem very happy. Also a few timing test fail.
       NOT_MARKERS: "timing proxy mypy"
 
-      # Enable to run tests using the minimum version of dependencies.
-      # PIP_CONSTRAINT: ${{ github.workspace }}/tests/constraints.txt
-
     defaults:
       run:
         shell: bash