From 9817925b44211fb103e05287a1aa8034be495d3f Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 2 Mar 2021 01:55:16 +0100 Subject: [PATCH] ci; Use PG* env vars to define the connection string --- .github/workflows/tests.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 143412ad3..f62433313 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 -- 2.47.2