]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci: Fix test dsn
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 2 Mar 2021 00:23:11 +0000 (01:23 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 2 Mar 2021 00:56:00 +0000 (01:56 +0100)
The github runner /etc/host file is pretty broken and localhost resolves
to ipv6, so use 127.0.0.1 to connect.

.github/workflows/tests.yml

index 59e4f8e765c9d33188fe41796d2582fb9c92ae7b..143412ad3af9992dbb8ee3c3c9bcb81fc86ffd96 100644 (file)
@@ -2,7 +2,9 @@ name: Tests
 
 on:
   push:
-    branches: [ master ]
+    branches:
+      - master
+      - ci-gh-actions
   pull_request:
     branches: [ master ]
 
@@ -26,7 +28,7 @@ jobs:
             toxenv: py38
 
     env:
-      PSYCOPG3_TEST_DSN: host=postgresql password=password dbname=psycopg3_test
+      PSYCOPG3_TEST_DSN: host=127.0.0.1 user=postgres password=password dbname=psycopg3_test
       PSYCOPG3_IMPL: python
 
     services:
@@ -49,8 +51,6 @@ jobs:
     - uses: actions/setup-python@v2
       with:
         python-version: ${{ matrix.python }}
-    - name: install postgresql client
-      run: sudo apt install postgresql-client-${{ matrix.postgres }}
     - name: install tox
       run: pip install tox
     - name: run tests
@@ -75,7 +75,7 @@ jobs:
             toxenv: py38
 
     env:
-      PSYCOPG3_TEST_DSN: host=postgresql password=password dbname=psycopg3_test
+      PSYCOPG3_TEST_DSN: host=127.0.0.1 user=postgres password=password dbname=psycopg3_test
       PSYCOPG3_IMPL: c
       # skip tests failing on importing psycopg3_c.pq on subprocess
       # they only fail on Travis, work ok locally under tox too.
@@ -101,8 +101,6 @@ jobs:
     - uses: actions/setup-python@v2
       with:
         python-version: ${{ matrix.python }}
-    - name: install postgresql client
-      run: sudo apt install postgresql-client-${{ matrix.postgres }}
     - name: install tox
       run: pip install tox
     - name: run tests