Skip to content

Commit

Permalink
feat: wait for postgres to boot before running tests (#7790)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sjaanus committed Aug 7, 2024
1 parent e155cb9 commit 80f9e32
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/publish-new-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 80f9e32

Please sign in to comment.