misc: add continuous integration support (jenkins.sh)

This commit is contained in:
Frédéric Péters 2016-02-14 20:27:33 +01:00
parent f7f7c2ef26
commit 4c2c1f5357
2 changed files with 23 additions and 0 deletions

19
jenkins.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
set -e
rm -f coverage.xml
rm -f test_results.xml
export PIP_USE_WHEEL=no
pip install --upgrade 'pip<8'
pip install --upgrade pylint==1.4.0 astroid==1.3.2 # 1.4.1 is buggy
pip install --upgrade pytest pytest-django pytest-cov WebTest
pip install --upgrade -r requirements.txt
PYTHONPATH=$(pwd):$PYTHONPATH DJANGO_SETTINGS_MODULE=chrono.settings CHRONO_SETTINGS_FILE=tests/settings.py \
py.test --junitxml=test_results.xml --cov-report xml --cov=chrono/ --cov-config .coveragerc tests/
test -f pylint.out && cp pylint.out pylint.out.prev
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc chrono | tee pylint.out) || /bin/true
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
django>=1.7, <1.8
gadjo
djangorestframework>=3.1
django-jsonfield >= 0.9.3