Browse Source

Test PyPy with 5.3.

Do we want to test other versions as well or just the most recent one?
Omer Katz 8 years ago
parent
commit
1cc787f6dd
1 changed files with 14 additions and 1 deletions
  1. 14 1
      .travis.yml

+ 14 - 1
.travis.yml

@@ -10,12 +10,25 @@ env:
     - TOXENV=2.7
     - TOXENV=3.4
     - TOXENV=3.5
-    - TOXENV=pypy
+    - TOXENV=pypy PYPY_VERSION="5.3"
     - TOXENV=pypy3
     - TOXENV=flake8
     - TOXENV=flakeplus
     - TOXENV=apicheck
     - TOXENV=configcheck
+before_install:
+    - |
+          if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then
+            export PYENV_ROOT="$HOME/.pyenv"
+            if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
+              cd "$PYENV_ROOT" && git pull
+            else
+              rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
+            fi
+            "$PYENV_ROOT/bin/pyenv" install "pypy-$PYPY_VERSION"
+            virtualenv --python="$PYENV_ROOT/versions/pypy-$PYPY_VERSION/bin/python" "$HOME/virtualenvs/pypy-$PYPY_VERSION"
+            source "$HOME/virtualenvs/pypy-$PYPY_VERSION/bin/activate"
+          fi
 install: travis_retry pip install -U tox
 script: tox -v -- -v
 after_success: