Added django-jenkins in preparation for CI.

This commit is contained in:
Jannis Leidel
2011-12-05 16:12:09 +01:00
parent 31c8a2f051
commit e256385992
3 changed files with 30 additions and 13 deletions

1
.gitignore vendored
View File

@@ -12,3 +12,4 @@ docs/_build/
.coverage .coverage
htmlcov htmlcov
.sass-cache .sass-cache
reports/

View File

@@ -11,6 +11,7 @@ INSTALLED_APPS = [
'django.contrib.sites', 'django.contrib.sites',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.admin', 'django.contrib.admin',
'django_jenkins',
'compressor', 'compressor',
'tests', 'tests',
] ]
@@ -22,3 +23,10 @@ MEDIA_ROOT = os.path.join(TEST_DIR, 'media')
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
os.path.join(TEST_DIR, 'templates'), 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',
)

View File

@@ -3,16 +3,12 @@ setupdir = ..
[testenv] [testenv]
commands = commands =
{envbindir}/coverage erase {envbindir}/python {envbindir}/django-admin.py jenkins {posargs:tests}
{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')"
downloadcache = {toxworkdir}/_download/ downloadcache = {toxworkdir}/_download/
distribute = false distribute = false
setenv = setenv =
PYTHONPATH = {toxinidir}/.. PYTHONPATH = {toxinidir}/..
DJANGO_SETTINGS_MODULE = tests.settings
[testenv:docs] [testenv:docs]
changedir = ../docs changedir = ../docs
@@ -28,7 +24,9 @@ deps =
unittest2 unittest2
BeautifulSoup==3.2.0 BeautifulSoup==3.2.0
html5lib html5lib
coverage pep8
pyflakes
django-jenkins
mock mock
jinja2 jinja2
django==1.2.5 django==1.2.5
@@ -39,7 +37,9 @@ deps =
unittest2 unittest2
BeautifulSoup==3.2.0 BeautifulSoup==3.2.0
html5lib html5lib
coverage pep8
pyflakes
django-jenkins
mock mock
jinja2 jinja2
django==1.2.5 django==1.2.5
@@ -50,7 +50,9 @@ deps =
unittest2 unittest2
BeautifulSoup==3.2.0 BeautifulSoup==3.2.0
html5lib html5lib
coverage pep8
pyflakes
django-jenkins
mock mock
jinja2 jinja2
django==1.2.5 django==1.2.5
@@ -62,7 +64,9 @@ deps =
unittest2 unittest2
BeautifulSoup==3.2.0 BeautifulSoup==3.2.0
html5lib html5lib
coverage pep8
pyflakes
django-jenkins
mock mock
jinja2 jinja2
django==1.3 django==1.3
@@ -73,7 +77,9 @@ deps =
unittest2 unittest2
BeautifulSoup==3.2.0 BeautifulSoup==3.2.0
html5lib html5lib
coverage pep8
pyflakes
django-jenkins
mock mock
jinja2 jinja2
django==1.3 django==1.3
@@ -84,7 +90,9 @@ deps =
unittest2 unittest2
BeautifulSoup==3.2.0 BeautifulSoup==3.2.0
html5lib html5lib
coverage pep8
pyflakes
django-jenkins
mock mock
jinja2 jinja2
django==1.3 django==1.3