Skip to content

Commit

Permalink
Merge pull request #44 from redapple/travis-pypy
Browse files Browse the repository at this point in the history
Re-add PyPy assuming >=5.0 and also run pypy tests on Travis CI
  • Loading branch information
kmike committed Jul 6, 2016
2 parents fde9087 + 579a247 commit 8eb2df9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,26 @@ language: python
python: 3.5
env:
- TOXENV=py27
- TOXENV=pypy
- TOXENV=py33
- TOXENV=py34
- TOXENV=py35

install:
- |
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:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27, py33, py34
envlist = py27, py33, py34, py35, pypy

[testenv]
deps =
Expand Down

0 comments on commit 8eb2df9

Please sign in to comment.