]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci: fix postgres service in 3rd party workflow
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 4 Feb 2023 10:05:11 +0000 (11:05 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 4 Feb 2023 10:05:11 +0000 (11:05 +0100)
.github/workflows/3rd-party-tests.yml

index 516ea08d09238f15277eacea6ceafa3c76f4d4ab..40ecf5b3c93f5c908194714e5cd2da1c0255c380 100644 (file)
@@ -46,13 +46,19 @@ jobs:
       DEPS: ./psycopg pytest pytest-xdist
 
     services:
-      pg:
+      postgresql:
         image: postgres:15
         env:
           POSTGRES_PASSWORD: password
           POSTGRES_DB: test
         ports:
           - 5432:5432
+        # Wait until postgres has started
+        options: >-
+          --health-cmd pg_isready
+          --health-interval 10s
+          --health-timeout 5s
+          --health-retries 5
 
     steps:
       - uses: actions/checkout@v3