Skip to content
Snippets Groups Projects
Commit 3e1b3651 authored by Jan Maximilian Michal's avatar Jan Maximilian Michal
Browse files

Added gitlab-ci

parent 3665f18f
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
.tox/ .tox/
__pycache__ __pycache__
MANIFEST MANIFEST
.coverage
cache/
# Django specific # Django specific
dist/ dist/
......
image: python:3.6
services:
- postgres:9.5
variables:
POSTGRES_DB: grady_dev
before_script:
- apt-get install wamerican
- python -V
- pip install --upgrade pip
- pip install -U -r requirements.txt
test:
variables:
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
script:
- coverage run --source="core,util" manage.py test --noinput
- coverage report --skip-covered
from django.contrib.auth.models import Group, User from django.contrib.auth.models import Group
from django.test import TestCase from django.test import TestCase
from core.models import Student, Submission, SubmissionType, Feedback from core.models import Submission, SubmissionType, Feedback
from util.importer import GradyUserFactory from util.importer import GradyUserFactory
......
...@@ -15,11 +15,11 @@ ALLOWED_HOSTS = ['localhost', 'grady.janmax.org'] ...@@ -15,11 +15,11 @@ ALLOWED_HOSTS = ['localhost', 'grady.janmax.org']
# sample postgre sql database configuration # sample postgre sql database configuration
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '__database_name', 'NAME': 'dev',
'USER': '__database_name_user', 'USER': 'postgres',
'PASSWORD': 'secret', 'PASSWORD': 'postgres',
'HOST': 'localhost', 'HOST': 'postgres',
'PORT': '', 'PORT': '5432',
}, },
} }
...@@ -6,3 +6,4 @@ gunicorn~=19.7.0 ...@@ -6,3 +6,4 @@ gunicorn~=19.7.0
psycopg2~=2.7.1 psycopg2~=2.7.1
xlrd~=1.0.0 xlrd~=1.0.0
lxml~=3.8.0 lxml~=3.8.0
pytest-cov~=2.5.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment