combo/jenkins.sh

31 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
set -e
rm -f coverage.xml
rm -f test_results.xml
test -d wcs || git clone http://git.entrouvert.org/wcs.git
(cd wcs && git pull)
export PIP_USE_WHEEL=no
(pip freeze | grep -q Quixote) || pip install quixote
(pip freeze | grep -q scgi) || pip install scgi
pip install --upgrade 'pip<8'
pip install --upgrade pylint pylint-django
pip install --upgrade -r requirements.txt
pip install --upgrade pytest pytest-django pytest-cov WebTest django-webtest
pip install --upgrade 'django>=1.7, <1.8'
pip install --no-deps --upgrade 'git+http://repos.entrouvert.org/cmsplugin-blurp.git/#egg=django-cmsplugin-blurp' # use blurp from git/master for now
pip install --upgrade XStatic-ChartNew.js
pip install --upgrade mock
WCSCTL=$(pwd)/wcs/wcsctl.py \
DJANGO_SETTINGS_MODULE=combo.settings \
COMBO_SETTINGS_FILE=tests/settings.py \
py.test --junitxml=test_results.xml --cov-report xml --cov=combo/ --cov-config .coveragerc tests/
test -f pylint.out && cp pylint.out pylint.out.prev
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc combo | tee pylint.out) || /bin/true
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true