We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d9fb87 commit 79bdd2bCopy full SHA for 79bdd2b
.github/workflows/integration-test.yml
@@ -16,7 +16,17 @@ jobs:
16
- 5432/tcp
17
18
steps:
19
- - name: Run tests
+ - name: Wait for Postgres database to be ready
20
+ env:
21
+ RETRIES: 5
22
run: |
- echo "Running integration tests..."
- telnet 127.0.0.1 ${{ job.services.postgres.ports['5432'] }}
23
+ # real retry/wait command
24
+ # until psql -h $PG_HOST -U $PG_USER -d $PG_DATABASE -c "select 1" > /dev/null 2>&1 || [ $RETRIES -eq 0 ]; do
25
+ # dummy wait
26
+ until [ $RETRIES -eq 0 ]; do
27
+ echo "Waiting for PostgreSQL to become ready, $((RETRIES--)) attempts remaining..."
28
+ sleep 5
29
+ done
30
+
31
+ - name: Run integration tests
32
+ run: echo "Running integration tests..."
0 commit comments