1
0

run_ci_tests.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. set -x
  2. yum install -y python-virtualenv python34 python34-devel \
  3. gcc python-cryptography python34-cryptography \
  4. libgit2 libgit2-devel python-pygit2 \
  5. redis swig openssl-devel m2crypto \
  6. python2-fedmsg python34-fedmsg-core fedmsg \
  7. python-tox python-pip python34-pip \
  8. parallel zeromq-devel python-Cython
  9. sysctl -w fs.file-max=2048
  10. set -e
  11. echo "============== ENVIRONMENT ============="
  12. /usr/bin/env
  13. echo "============== END ENVIRONMENT ============="
  14. if [ -n "$REPO" -a -n "$BRANCH" ]; then
  15. git remote rm proposed || true
  16. git gc --auto
  17. git remote add proposed "$REPO"
  18. git fetch proposed
  19. git checkout origin/master
  20. git config --global user.email "you@example.com"
  21. git config --global user.name "Your Name"
  22. git merge --no-ff "proposed/$BRANCH" -m "Merge PR"
  23. echo "Running tests for branch $BRANCH of repo $REPO"
  24. echo "Last commits:"
  25. git log -2
  26. fi
  27. # Apparently newer requests has strong feeling about idna:
  28. # https://github.com/requests/requests/commit/991e8b76b7a9d21f698b24fa
  29. # and only in py3 we're having a version that is too old (2.1)
  30. pip3 install --upgrade "idna<2.8"
  31. pip install --upgrade tox trollius coverage
  32. pip install --upgrade --force-reinstall chardet
  33. pip3 install "pygit2 <= `rpm -q libgit2 --queryformat='%{version}'`"
  34. tox --sitepackages -e 'py27-flask011-ci' -- --results=results-py2
  35. tox --sitepackages -e 'py34-flask011-ci' -- --results=results-py3