1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +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 GitHub
parent 74de3ea72e
commit c36ead4b74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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: