I am facing this service for hours but still I do not have solutions. My gitlab.yml looks like this
image: python:3.6
services:
- postgres:latest
variables:
POSTGRES_DB: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: trust
job:on-schedule:
only:
- schedules
script:
- export DATABASE_URL=postgres://postgres:@postgres:5432/test
- apt-get -yq update
- apt-get -yq install python-pip
- pip install -r requirements.txt
- python manage.py test
and settings
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'test',
'USER': 'postgres',
'PASSWORD': '',
'HOST': 'postgres',
'PORT': '5432'
}
}
at first I have come about a connection error like is it listening to 5432 and locally etc.
Now I am facing time out. All processes passed when it comes to the python manage.py test it does not run next. I do not know why. Please anybody can help??? Thanks in advance