Skip to content

Commit

Permalink
Tests. Use pyenv instead native Python support in Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
diyan committed Dec 21, 2016
1 parent 129e652 commit bbdb2f0
Showing 1 changed file with 52 additions and 27 deletions.
79 changes: 52 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,61 @@
# http://travis-ci.org/#!/diyan/pywinrm
language: python
# pyenv used instead of native Python support in Travis CI to:
# - Make build steps exactly the same on both Linux and Mac OS workers
# - Make possible to debug build steps on local workstation
# - Integrate new Python / PyPy releases earlier; pyenv does it with less lag than Travis
language: generic
cache:
directories:
- $HOME/.cache/pip
- $HOME/.pyenv
matrix:
- os: linux
dist: precise
sudo: false
- os: linux
dist: trusty
sudo: false
- os: osx
osx_image: xcode7.2
python:
- 2.6
- 2.7
# NOTE Python 3.0-3.2 do not support explicit unicode literal, see pep-0414
- 3.3
- 3.4
- 3.5
- 3.6-dev
- pypy
# TODO wait for Travis CI update from PyPy3 v2.4.0 to PyPy3.3 v5.5, reason:
# cryptography 1.0 is not compatible with PyPy < 2.6
# - pypy3
include:
# Python 3.0-3.2 does not support explicit unicode literal, see pep-0414
# Define 'sudo: false' to run on container-based workers
- { os: linux, dist: precise, sudo: false, env: UBUNTU=12.04 PYENV=2.6.9 }
- { os: linux, dist: precise, sudo: false, env: UBUNTU=12.04 PYENV=2.7.13 }
- { os: linux, dist: precise, sudo: false, env: UBUNTU=12.04 PYENV=3.3.6 }
- { os: linux, dist: precise, sudo: false, env: UBUNTU=12.04 PYENV=3.4.5 }
- { os: linux, dist: precise, sudo: false, env: UBUNTU=12.04 PYENV=3.5.2 }
- { os: linux, dist: precise, sudo: false, env: UBUNTU=12.04 PYENV=3.6-dev }
- { os: linux, dist: precise, sudo: false, env: UBUNTU=12.04 PYENV=pypy2-5.6.0 }
- { os: linux, dist: precise, sudo: false, env: UBUNTU=12.04 PYENV=pypy3.3-5.5-alpha }

- { os: linux, dist: trusty, sudo: false, env: UBUNTU=14.04 PYENV=2.6.9 }
- { os: linux, dist: trusty, sudo: false, env: UBUNTU=14.04 PYENV=2.7.13 }
- { os: linux, dist: trusty, sudo: false, env: UBUNTU=14.04 PYENV=3.3.6 }
- { os: linux, dist: trusty, sudo: false, env: UBUNTU=14.04 PYENV=3.4.5 }
- { os: linux, dist: trusty, sudo: false, env: UBUNTU=14.04 PYENV=3.5.2 }
- { os: linux, dist: trusty, sudo: false, env: UBUNTU=14.04 PYENV=3.6-dev }
- { os: linux, dist: trusty, sudo: false, env: UBUNTU=14.04 PYENV=pypy2-5.6.0 }
- { os: linux, dist: trusty, sudo: false, env: UBUNTU=14.04 PYENV=pypy3.3-5.5-alpha }

- { os: osx, osx_image: xcode6.4, language: generic, env: OSX=10.10 PYENV=2.7.13 }
- { os: osx, osx_image: xcode6.4, language: generic, env: OSX=10.10 PYENV=3.5.2 }

- { os: osx, osx_image: xcode7, language: generic, env: OSX=10.11 PYENV=2.7.13 }
- { os: osx, osx_image: xcode7, language: generic, env: OSX=10.11 PYENV=3.5.2 }

- { os: osx, osx_image: xcode8.2, language: generic, env: OSX=10.12 PYENV=2.7.13 }
- { os: osx, osx_image: xcode8.2, language: generic, env: OSX=10.12 PYENV=3.5.2 }

install:
#- sudo apt-get install libffi-dev
#- pip install cffi coveralls
# upgrade pip to ensure we've got a new enough version that allows installation from local source
- curl https://bootstrap.pypa.io/get-pip.py | python
# Always use latest pyenv but keep installed Python versions in cache
- git clone https://github.com/yyuu/pyenv.git ~/.pyenv || true
- (cd ~/.pyenv && git pull)
- export PATH="$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH"
- pyenv --version
- pyenv install --skip-existing $PYENV
- pyenv global $PYENV
- pyenv rehash
- python --version
- pip --version
- pwd
- pip install virtualenv
- python -m virtualenv ~/.venv
- source ~/.venv/bin/activate
- pip install coveralls
- pip install .[kerberos]
- pip install .[credssp]
- pip install .[kerberos]
- pip install -r requirements-test.txt
script:
- py.test -v --pep8 --cov=winrm --cov-report=term-missing winrm/tests/
Expand Down

0 comments on commit bbdb2f0

Please sign in to comment.