From e256385992bb65ed7ae6377ea7b2c18aa83af0a7 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 5 Dec 2011 16:12:09 +0100 Subject: [PATCH] Added django-jenkins in preparation for CI. --- .gitignore | 3 ++- tests/settings.py | 8 ++++++++ tests/tox.ini | 32 ++++++++++++++++++++------------ 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index ad98ab7..de1344d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ MANIFEST docs/_build/ .coverage htmlcov -.sass-cache \ No newline at end of file +.sass-cache +reports/ diff --git a/tests/settings.py b/tests/settings.py index e3c819b..5bb0459 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -11,6 +11,7 @@ INSTALLED_APPS = [ 'django.contrib.sites', 'django.contrib.auth', 'django.contrib.admin', + 'django_jenkins', 'compressor', 'tests', ] @@ -22,3 +23,10 @@ MEDIA_ROOT = os.path.join(TEST_DIR, 'media') TEMPLATE_DIRS = ( os.path.join(TEST_DIR, 'templates'), ) + +JENKINS_TASKS = ( + 'django_jenkins.tasks.run_pyflakes', + 'django_jenkins.tasks.run_pep8', + 'django_jenkins.tasks.with_coverage', + 'django_jenkins.tasks.django_tests', +) diff --git a/tests/tox.ini b/tests/tox.ini index afb3c78..e0891c9 100644 --- a/tests/tox.ini +++ b/tests/tox.ini @@ -3,16 +3,12 @@ setupdir = .. [testenv] commands = - {envbindir}/coverage erase - {envbindir}/coverage run --branch --include=*compressor* --omit=*test*,*rjsmin*,*cssmin*,*stringformat*,*models* {envbindir}/django-admin.py test {posargs:tests} --settings=tests.settings - {envbindir}/coverage report - {envbindir}/coverage html -d {envtmpdir} - python -c "print('Type the following to open the coverage report: python -m webbrowser -t file://{envtmpdir}/index.html')" + {envbindir}/python {envbindir}/django-admin.py jenkins {posargs:tests} downloadcache = {toxworkdir}/_download/ distribute = false setenv = PYTHONPATH = {toxinidir}/.. - + DJANGO_SETTINGS_MODULE = tests.settings [testenv:docs] changedir = ../docs @@ -28,7 +24,9 @@ deps = unittest2 BeautifulSoup==3.2.0 html5lib - coverage + pep8 + pyflakes + django-jenkins mock jinja2 django==1.2.5 @@ -39,7 +37,9 @@ deps = unittest2 BeautifulSoup==3.2.0 html5lib - coverage + pep8 + pyflakes + django-jenkins mock jinja2 django==1.2.5 @@ -50,7 +50,9 @@ deps = unittest2 BeautifulSoup==3.2.0 html5lib - coverage + pep8 + pyflakes + django-jenkins mock jinja2 django==1.2.5 @@ -62,7 +64,9 @@ deps = unittest2 BeautifulSoup==3.2.0 html5lib - coverage + pep8 + pyflakes + django-jenkins mock jinja2 django==1.3 @@ -73,7 +77,9 @@ deps = unittest2 BeautifulSoup==3.2.0 html5lib - coverage + pep8 + pyflakes + django-jenkins mock jinja2 django==1.3 @@ -84,7 +90,9 @@ deps = unittest2 BeautifulSoup==3.2.0 html5lib - coverage + pep8 + pyflakes + django-jenkins mock jinja2 django==1.3