diff --git a/.gitignore b/.gitignore index d43bad4e2..d5edd3499 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ docs/_build/* build/* dist/* .DS_Store +settings.py # Unit test / coverage reports .coverage diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..b65d5b1dd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: python +python: + - "2.5" + - "2.6" + - "2.7" +install: + - pip install -r requirements.txt --use-mirrors + - pip install coverage django-discover-runner + - python extras/scripts/create_local_settings.py +script: coverage run ./manage.py test tests && coverage report -m diff --git a/extras/scripts/create_local_settings.py b/extras/scripts/create_local_settings.py new file mode 100644 index 000000000..1702992e0 --- /dev/null +++ b/extras/scripts/create_local_settings.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os +import sys + +script_path = os.path.realpath(os.path.dirname(__file__)) +sys.path.append(os.path.join(script_path, '..', '..')) + +from openslides.main import create_settings + +if __name__ == "__main__": + cwd = os.getcwd() + create_settings(os.path.join(cwd, 'settings.py'), + os.path.join(cwd, 'database.sqlite')) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..5a62061ce --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +Django==1.4.2 +django-mptt +reportlab +pil +simplejson