File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 6
6
services :
7
7
postgres :
8
8
image : postgres:10.1
9
+ env :
10
+ POSTGRES_USER : postgres
11
+ POSTGRES_PASSWORD : postgres
12
+ POSTGRES_DB : python.org
9
13
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
11
17
steps :
12
18
- name : Check out repository
13
19
uses : actions/checkout@v2
33
39
run : |
34
40
python -Wd -m coverage run manage.py test -v2
35
41
env :
36
- DATABASE_URL : postgres://postgres:@127.0.0.1: 5432/python.org
42
+ DATABASE_URL : postgres://postgres:postgres@postgres:${{ job.services.postgres.ports[ 5432] }} /python.org
37
43
- name : Coverage
38
44
run : |
39
45
coverage report -m --fail-under=75
You can’t perform that action at this time.
0 commit comments