-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathci.sh
More file actions
executable file
·32 lines (27 loc) · 823 Bytes
/
ci.sh
File metadata and controls
executable file
·32 lines (27 loc) · 823 Bytes
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
#!/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
python setup.py install_dev
python example/manage.py test --with-xunit --with-xcover --cover-package=wizard
TEST_EXIT=$?
rm -rf jenkins_reports
mkdir jenkins_reports
pep8 wizard > jenkins_reports/pep8.report
PEP8_EXIT=$?
pyflakes wizard > 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