From 5877f7692c0dddceafd3f2624922bc482c09ab0c Mon Sep 17 00:00:00 2001 From: Joe <me@kennydude.me> Date: Fri, 31 Mar 2017 12:24:07 +0000 Subject: [PATCH] Update Django.gitlab-ci.yml --- Django.gitlab-ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Django.gitlab-ci.yml b/Django.gitlab-ci.yml index b310686..5ded2f5 100644 --- a/Django.gitlab-ci.yml +++ b/Django.gitlab-ci.yml @@ -26,9 +26,24 @@ before_script: # - apt-get update -q && apt-get install nodejs -yqq - pip install -r requirements.txt +# To get Django tests to work you may need to create a settings file using +# the following DATABASES: +# +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.postgresql_psycopg2', +# 'NAME': 'ci', +# 'USER': 'postgres', +# 'PASSWORD': 'postgres', +# 'HOST': 'postgres', +# 'PORT': '5432', +# }, +# } +# +# and then adding `--settings app.settings.ci` (or similar) to the test command + test: variables: DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB" script: - - python manage.py migrate - python manage.py test -- GitLab