diff --git a/.travis.yml b/.travis.yml index 1af77f6..3661a44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,19 +14,19 @@ - python: pypy - os: osx language: generic - env: PYTHON=3.7.2 TOXENV=py37 + env: CONDA=3.7 TOXENV=py37 - os: osx language: generic - env: PYTHON=3.6.8 TOXENV=py36 + env: CONDA=3.6 TOXENV=py36 - os: osx language: generic - env: PYTHON=3.5.7 TOXENV=py35 + env: CONDA=3.5 TOXENV=py35 - os: osx language: generic - env: PYTHON=3.4.10 TOXENV=py34 + env: CONDA=3.4 TOXENV=py34 - os: osx language: generic - env: PYTHON=2.7.16 TOXENV=py27 + env: CONDA=2.7 TOXENV=py27 allow_failures: - env: OPTIONAL=1 @@ -34,24 +34,16 @@ fast_finish: true before_install: | - if [ "$TRAVIS_OS_NAME" == "osx" ]; then - brew update - # Per the `pyenv homebrew recommendations `_. - brew install openssl readline - # See https://docs.travis-ci.com/user/osx-ci-environment/#A-note-on-upgrading-packages. - # I didn't do this above because it works and I'm lazy. - brew outdated pyenv || brew upgrade pyenv - # virtualenv doesn't work without pyenv knowledge. venv in Python 3.3 - # doesn't provide Pip by default. So, use `pyenv-virtualenv `_. - brew install pyenv-virtualenv - pyenv install $PYTHON - # I would expect something like ``pyenv init; pyenv local $PYTHON`` or - # ``pyenv shell $PYTHON`` would work, but ``pyenv init`` doesn't seem to - # modify the Bash environment. ??? So, I hand-set the variables instead. - export PYENV_VERSION=$PYTHON - export PATH="/Users/travis/.pyenv/shims:${PATH}" - pyenv-virtualenv venv - source venv/bin/activate + if [ ! -z "$CONDA" ]; then + if [ "$TRAVIS_OS_NAME" == "osx" ]; then + curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh --output miniconda.sh + fi + chmod +x miniconda.sh + ./miniconda.sh -b + export PATH=$HOME/miniconda3/bin:$PATH + conda update --yes conda + conda create --yes -n travis python=$CONDA + source activate travis # A manual check that the correct version of Python is running. python --version fi