Skip to content

Commit

Permalink
Ensure Postgres readiness before running tests
Browse files Browse the repository at this point in the history
Added a step to ensure Postgres is ready before executing tests by using `pg_isready`. This prevents potential test failures due to database unavailability, enhancing the reliability of the CI pipeline.
  • Loading branch information
eliasjpr committed Aug 13, 2024
1 parent 2c2262b commit a6b9eac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/crystal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
ports:
- 5432:5432
env:
POSTGRES_USER: example
POSTGRES_USER: postgres
POSTGRES_PASSWORD: example
POSTGRES_DB: example
options: >-
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
run: crystal tool format --check
- name: Run tests
env:
DATABASE_URL: postgres://example:example@localhost:5432/example
DATABASE_URL: postgres://postgres:example@0.0.0.0:5432/example
run: crystal spec

docs:
Expand Down

0 comments on commit a6b9eac

Please sign in to comment.