Commit a4ebd835 authored by Wietse Kuipers's avatar Wietse Kuipers
Browse files

Configured CI to use postgres

parent ce78087e
variables:
POSTGRES_DB: thalia
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
CI_DEPS: psycopg2
services:
- postgres:latest
pep8: pep8:
image: python:3.4 image: python:3.4
before_script: before_script:
......
...@@ -9,7 +9,11 @@ commands = ...@@ -9,7 +9,11 @@ commands =
python manage.py templatecheck --project-only python manage.py templatecheck --project-only
python manage.py makemigrations --no-input --check --dry-run python manage.py makemigrations --no-input --check --dry-run
python -Wall manage.py test python -Wall manage.py test
deps = -r{toxinidir}/requirements.txt deps =
-r{toxinidir}/requirements.txt
{env:CI_DEPS:}
passenv = GITLAB_CI
[flake8] [flake8]
exclude = */migrations/*, */urls.py, .ropeproject exclude = */migrations/*, */urls.py, .ropeproject
......
...@@ -8,3 +8,5 @@ except ImportError: ...@@ -8,3 +8,5 @@ except ImportError:
if os.environ.get('DJANGO_PRODUCTION'): if os.environ.get('DJANGO_PRODUCTION'):
from .production import * from .production import *
if os.environ.get('GITLAB_CI'):
from .testing import *
...@@ -110,7 +110,6 @@ WSGI_APPLICATION = 'thaliawebsite.wsgi.application' ...@@ -110,7 +110,6 @@ WSGI_APPLICATION = 'thaliawebsite.wsgi.application'
# Database # Database
# https://docs.djangoproject.com/en/dev/ref/settings/#databases # https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', '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