Skip to content

Commit 2e4006c

Browse files
committed
Fix Github Action PostgreSQL config
1 parent 9928e1b commit 2e4006c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ jobs:
66
services:
77
postgres:
88
image: postgres:10.1
9+
env:
10+
POSTGRES_USER: postgres
11+
POSTGRES_PASSWORD: postgres
12+
POSTGRES_DB: pythonorg
913
ports:
10-
- 5432:5432
14+
- 5432:5432
15+
# needed because the postgres container does not provide a healthcheck
16+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
1117
steps:
1218
- name: Check out repository
1319
uses: actions/checkout@v2
@@ -33,7 +39,7 @@ jobs:
3339
run: |
3440
python -Wd -m coverage run manage.py test -v2
3541
env:
36-
DATABASE_URL: postgres://postgres:@127.0.0.1:5432/python.org
42+
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pythonorg
3743
- name: Coverage
3844
run: |
3945
coverage report -m --fail-under=75

0 commit comments

Comments
 (0)