Skip to content

Commit

Permalink
Update pytest.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pgorecki authored Dec 14, 2022
1 parent adf37a2 commit 5caaf32
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ jobs:

runs-on: ubuntu-latest

# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
image: postgres:latest
env:
POSTGRES_PASSWORD: password
# Set health checks to wait until postgres has started
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
Expand All @@ -44,4 +43,4 @@ jobs:
poetry run pytest src
env:
# The hostname used to communicate with the PostgreSQL service container
DATABASE_URL: postgresql://postgres:password@postgres:5432/postgres
DATABASE_URL: postgresql://postgres:password@postgres:5432/test_db

0 comments on commit 5caaf32

Please sign in to comment.