1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

feat: wait for postgres to boot before running tests (#7790)

Tests were failing on this workflow due to postgres taking longer to
boot up, now it will wait for postgres to boot up before continuing.
This commit is contained in:
Jaanus Sellin 2024-08-07 11:12:45 +03:00 committed by sjaanus
parent e155cb9923
commit 80f9e329f5
No known key found for this signature in database
GPG Key ID: 20E007C0248BA7FF

View File

@ -32,6 +32,21 @@ jobs:
matrix:
node-version: [ 20.x ]
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_INITDB_ARGS: "--no-sync"
# Set health checks to wait until postgres has started
ports:
- 5432:5432
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
with: