Skip to content

Commit

Permalink
add wait for
Browse files Browse the repository at this point in the history
  • Loading branch information
aarushik93 committed Apr 19, 2024
1 parent 7cb5397 commit 6a73cce
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
POSTGRES_DB: ${{ secrets.DB_NAME }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
Expand All @@ -46,6 +51,13 @@ jobs:
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'

- name: Wait for PostgreSQL
uses: MaximeGoyette/wait-for-it-action@master
with:
host: postgres
port: 5432
timeout: 30

- name: Generate Prisma Client
run: poetry run prisma generate

Expand All @@ -65,13 +77,6 @@ jobs:
RUN_ENV: ci
PORT: 8080

- name: Wait for PostgreSQL
uses: MaximeGoyette/wait-for-it-action@master
with:
host: postgres
port: 5432
timeout: 30

- name: Run Database Migrations
run: |
poetry run prisma migrate dev --name updates
Expand Down

0 comments on commit 6a73cce

Please sign in to comment.