Skip to content

Commit 5caaf32

Browse files
authored
Update pytest.yml
1 parent adf37a2 commit 5caaf32

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/pytest.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ jobs:
1414

1515
runs-on: ubuntu-latest
1616

17-
# Service containers to run with `container-job`
1817
services:
19-
# Label used to access the service container
2018
postgres:
21-
# Docker Hub image
22-
image: postgres
23-
# Provide the password for postgres
19+
image: postgres:latest
2420
env:
25-
POSTGRES_PASSWORD: password
26-
# Set health checks to wait until postgres has started
21+
POSTGRES_USER: postgres
22+
POSTGRES_PASSWORD: postgres
23+
POSTGRES_DB: test_db
24+
ports:
25+
- 5432:5432
2726
options: >-
2827
--health-cmd pg_isready
2928
--health-interval 10s
@@ -44,4 +43,4 @@ jobs:
4443
poetry run pytest src
4544
env:
4645
# The hostname used to communicate with the PostgreSQL service container
47-
DATABASE_URL: postgresql://postgres:password@postgres:5432/postgres
46+
DATABASE_URL: postgresql://postgres:password@postgres:5432/test_db

0 commit comments

Comments
 (0)