Blame run_ci_tests.sh

Pierre-Yves Chibon 8f9296
yum install -y python-virtualenv \
Pierre-Yves Chibon 8f9296
               gcc python-cryptography \
Pierre-Yves Chibon 8f9296
               libgit2 python-pygit2 \
Pierre-Yves Chibon b8b020
               redis swig openssl-devel m2crypto \
Pierre-Yves Chibon b6b51f
               python2-fedmsg fedmsg \
Pierre-Yves Chibon b6b51f
               python2-pylint python-pep8
Pierre-Yves Chibon 8f9296
Pierre-Yves Chibon 8f9296
sysctl -w fs.file-max=2048
Pierre-Yves Chibon 8f9296
Pierre-Yves Chibon a403cf
set -e
Pierre-Yves Chibon a403cf
Pierre-Yves Chibon 781323
if [ -n "$REPO" -a -n "$BRANCH" ]; then
Pierre-Yves Chibon 781323
git remote rm proposed || true
Pierre-Yves Chibon 781323
git gc --auto
Pierre-Yves Chibon 781323
git remote add proposed "$REPO"
Pierre-Yves Chibon 781323
git fetch proposed
Pierre-Yves Chibon 781323
git checkout origin/master
Pierre-Yves Chibon 781323
git config --global user.email "you@example.com"
Pierre-Yves Chibon 781323
git config --global user.name "Your Name"
Pierre-Yves Chibon 781323
git merge --no-ff "proposed/$BRANCH" -m "Merge PR"
Pierre-Yves Chibon 9ee9ee
Pierre-Yves Chibon 9ee9ee
echo "Running tests for branch $BRANCH of repo $REPO"
Pierre-Yves Chibon b83373
echo "Last commits:"
Pierre-Yves Chibon b83373
git log -2
Pierre-Yves Chibon 781323
fi
Pierre-Yves Chibon 781323
Pierre-Yves Chibon 781323
Pierre-Yves Chibon 8f9296
virtualenv pagureenv --system-site-packages
Pierre-Yves Chibon 8f9296
source pagureenv/bin/activate
Pierre-Yves Chibon 8f9296
Pierre-Yves Chibon 8f9296
pip install pip --upgrade
Pierre-Yves Chibon 8f9296
# Needed within the venv
Pierre-Yves Chibon 8f9296
pip install nose --upgrade
Pierre-Yves Chibon 8f9296
pip install --upgrade --force-reinstall python-fedora 'setuptools>=17.1' pygments
Pierre-Yves Chibon 8f9296
pip install -r tests_requirements.txt
Pierre-Yves Chibon 8f9296
pip install -r requirements-ev.txt  # We have one test on the SSE server
Pierre-Yves Chibon 8f9296
sed -i -e 's|pygit2 >= 0.20.1||' requirements.txt
Pierre-Yves Chibon 8f9296
pip install -r requirements.txt
Pierre-Yves Chibon 8f9296
pip install psycopg2
Pierre-Yves Chibon 8f9296
pip install python-openid python-openid-teams python-openid-cla
Pierre-Yves Chibon 8f9296
Pierre-Yves Chibon 8f9296
#    pip uninstall cffi -y
Pierre-Yves Chibon b1bbd1
trap deactivate SIGINT SIGTERM EXIT
Pierre-Yves Chibon 781323
Pierre-Yves Chibon 781323
Pierre-Yves Chibon 781323
# Reload where the nosetests app is (within the venv)
Pierre-Yves Chibon 781323
hash -r
Pierre-Yves Chibon 781323
Pierre-Yves Chibon 51c7db
Pierre-Yves Chibon 781323
python setup.py build
Pierre-Yves Chibon 781323
Pierre-Yves Chibon bfc8ce
PAGURE_CONFIG=`pwd`/tests/test_config \
Pierre-Yves Chibon bfc8ce
PYTHONPATH=pagure \
Pierre-Yves Chibon bfc8ce
./nosetests -v --with-xcoverage --cover-erase --cover-package=pagure
Pierre-Yves Chibon 781323
Pierre-Yves Chibon 4f6f98
set +e
Pierre-Yves Chibon 781323
Pierre-Yves Chibon 463e17
PYTHONPATH=pagure pylint-2 -f parseable pagure | tee pylint.out
Pierre-Yves Chibon 4f6f98
pep8 pagure/*.py pagure/*/*.py | tee pep8.out
Pierre-Yves Chibon 8d1443