]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci; Use PG* env vars to define the connection string
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 2 Mar 2021 00:55:16 +0000 (01:55 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 2 Mar 2021 01:03:43 +0000 (02:03 +0100)
.github/workflows/tests.yml

index 143412ad3af9992dbb8ee3c3c9bcb81fc86ffd96..f62433313f7f3df6c9150d2225d9d341fde69d11 100644 (file)
@@ -28,14 +28,16 @@ jobs:
             toxenv: py38
 
     env:
-      PSYCOPG3_TEST_DSN: host=127.0.0.1 user=postgres password=password dbname=psycopg3_test
       PSYCOPG3_IMPL: python
+      PGHOST: 127.0.0.1
+      PGUSER: postgres
+      PGPASSWORD: password
+      PSYCOPG3_TEST_DSN: "dbname=postgres"
 
     services:
       postgresql:
         image: postgres:${{ matrix.postgres }}
         env:
-          POSTGRES_DB: psycopg3_test
           POSTGRES_PASSWORD: password
         ports:
           - 5432:5432
@@ -75,8 +77,11 @@ jobs:
             toxenv: py38
 
     env:
-      PSYCOPG3_TEST_DSN: host=127.0.0.1 user=postgres password=password dbname=psycopg3_test
       PSYCOPG3_IMPL: c
+      PGHOST: 127.0.0.1
+      PGUSER: postgres
+      PGPASSWORD: password
+      PSYCOPG3_TEST_DSN: "dbname=postgres"
       # skip tests failing on importing psycopg3_c.pq on subprocess
       # they only fail on Travis, work ok locally under tox too.
       PYTEST_ADDOPTS: "-m 'not subprocess'"
@@ -85,7 +90,6 @@ jobs:
       postgresql:
         image: postgres:${{ matrix.postgres }}
         env:
-          POSTGRES_DB: psycopg3_test
           POSTGRES_PASSWORD: password
         ports:
           - 5432:5432