Commit a9606b5c authored by Joost Rijneveld's avatar Joost Rijneveld

Merge branch '160-postgres-ci' into 'master'

Configured CI to use postgres

Closes #160 

Ugly hack in .gitlab-ci.yml and tox.ini is ugly but tox doesn't do conditional dependencies

See merge request !194
parents 551fb87c a4ebd835
variables:
POSTGRES_DB: thalia
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
CI_DEPS: psycopg2
services:
- postgres:latest
pep8:
image: python:3.4
before_script:
......
......@@ -9,7 +9,11 @@ commands =
python manage.py templatecheck --project-only
python manage.py makemigrations --no-input --check --dry-run
python -Wall manage.py test
deps = -r{toxinidir}/requirements.txt
deps =
-r{toxinidir}/requirements.txt
{env:CI_DEPS:}
passenv = GITLAB_CI
[flake8]
exclude = */migrations/*, */urls.py, .ropeproject
......
......@@ -8,3 +8,5 @@ except ImportError:
if os.environ.get('DJANGO_PRODUCTION'):
from .production import *
if os.environ.get('GITLAB_CI'):
from .testing import *
......@@ -110,7 +110,6 @@ WSGI_APPLICATION = 'thaliawebsite.wsgi.application'
# Database
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
......
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'thalia',
'USER': 'postgres',
'PASSWORD': '',
'HOST': 'postgres',
'PORT': 5432,
},
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment