forked from mattjmorrison/django-multiselect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci.sh
executable file
·34 lines (27 loc) · 839 Bytes
/
ci.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# verify user provided a name for the virtualenv
if [ -z "$1" ]; then
echo "usage: $0 virtual_env_name"
exit
fi
VIRTUALENV_NAME=$1
virtualenv $VIRTUALENV_NAME
. $VIRTUALENV_NAME/bin/activate
find . -name "*.pyc" -delete
pip install -r requirements/ci.txt
python manage.py test --with-xunit --with-xcover --cover-package=multiselect
TEST_EXIT=$?
rm -rf jenkins_reports
mkdir jenkins_reports
pep8 multiselect > jenkins_reports/pep8.report
PEP8_EXIT=$?
pyflakes multiselect > jenkins_reports/pyflakes.report
PYFLAKES_EXIT=$?
let JENKINS_EXIT="$TEST_EXIT + $PEP8_EXIT + $PYFLAKES_EXIT"
if [ $JENKINS_EXIT -gt 2 ]; then
echo "Test exit status:" $TEST_EXIT
echo "PEP8 exit status:" $PEP8_EXIT
echo "Pyflakes exit status:" $PYFLAKES_EXIT
echo "Exiting Build with status:" $EXIT
exit $JENKINS_EXIT
fi