Merge pull request #2215 from redapple/travis-pypy

Enable PyPy tests on Travis (allowed to fail)
This commit is contained in:
Mikhail Korobov 2017-02-03 02:38:49 +05:00 committed by GitHub
commit 7b8bbc9205
2 changed files with 26 additions and 1 deletions

View File

@ -17,10 +17,30 @@ matrix:
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 2.7
env: TOXENV=pypy
- python: 3.6
env: TOXENV=docs
allow_failures:
- python: 2.7
env: TOXENV=pypy
install:
- pip install -U tox twine wheel codecov
- |
if [ "$TOXENV" = "pypy" ]; then
export PYENV_ROOT="$HOME/.pyenv"
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
pushd "$PYENV_ROOT" && git pull && popd
else
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
fi
# get latest PyPy from pyenv directly (thanks to natural version sort option -V)
export PYPY_VERSION=`"$PYENV_ROOT/bin/pyenv" install --list |grep -o -E 'pypy-[0-9][\.0-9]*$' |sort -V |tail -1`
"$PYENV_ROOT/bin/pyenv" install --skip-existing "$PYPY_VERSION"
virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
fi
- pip install -U tox twine wheel codecov
script: tox
after_success:
- codecov

View File

@ -54,6 +54,11 @@ commands =
pip install -U https://github.com/scrapy/queuelib/archive/master.zip#egg=queuelib
py.test --cov=scrapy --cov-report= {posargs:scrapy tests}
[testenv:pypy]
basepython = pypy
commands =
py.test {posargs:scrapy tests}
[testenv:py33]
basepython = python3.3
deps =