From 8c4f614d2101c21d3560fe68dcec6d3910417cb7 Mon Sep 17 00:00:00 2001 From: Paul Tremberth Date: Thu, 1 Sep 2016 15:25:38 +0200 Subject: [PATCH 1/2] Enable PyPy tests on Travis --- .travis.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6f3ab511f..2df02ea43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 From 70f260d3537d788e4efaf4a060fce7f0fc183ed9 Mon Sep 17 00:00:00 2001 From: Paul Tremberth Date: Wed, 1 Feb 2017 15:14:32 +0100 Subject: [PATCH 2/2] Don't run coverage stats when on PyPy --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tox.ini b/tox.ini index bdc14a128..0fdea11bb 100644 --- a/tox.ini +++ b/tox.ini @@ -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 =