Merge pull request #22 from DiamondLightSource/reqs
Update test python versions and requirements
Markus Gerstel authored 5 years ago
GitHub committed 5 years ago
13 | 13 | - python: pypy |
14 | 14 | - os: osx |
15 | 15 | language: generic |
16 | env: PYTHON=3.7.2 TOXENV=py37 | |
16 | env: CONDA=3.7 TOXENV=py37 | |
17 | 17 | - os: osx |
18 | 18 | language: generic |
19 | env: PYTHON=3.6.8 TOXENV=py36 | |
19 | env: CONDA=3.6 TOXENV=py36 | |
20 | 20 | - os: osx |
21 | 21 | language: generic |
22 | env: PYTHON=3.5.6 TOXENV=py35 | |
22 | env: CONDA=3.5 TOXENV=py35 | |
23 | 23 | - os: osx |
24 | 24 | language: generic |
25 | env: PYTHON=3.4.9 TOXENV=py34 | |
26 | - os: osx | |
27 | language: generic | |
28 | env: PYTHON=2.7.15 TOXENV=py27 | |
25 | env: CONDA=2.7 TOXENV=py27 | |
29 | 26 | |
30 | 27 | allow_failures: |
31 | 28 | - env: OPTIONAL=1 |
33 | 30 | fast_finish: true |
34 | 31 | |
35 | 32 | before_install: | |
36 | if [ "$TRAVIS_OS_NAME" == "osx" ]; then | |
37 | brew update | |
38 | # Per the `pyenv homebrew recommendations <https://github.com/yyuu/pyenv/wiki#suggested-build-environment>`_. | |
39 | brew install openssl readline | |
40 | # See https://docs.travis-ci.com/user/osx-ci-environment/#A-note-on-upgrading-packages. | |
41 | # I didn't do this above because it works and I'm lazy. | |
42 | brew outdated pyenv || brew upgrade pyenv | |
43 | # virtualenv doesn't work without pyenv knowledge. venv in Python 3.3 | |
44 | # doesn't provide Pip by default. So, use `pyenv-virtualenv <https://github.com/yyuu/pyenv-virtualenv/blob/master/README.md>`_. | |
45 | brew install pyenv-virtualenv | |
46 | pyenv install $PYTHON | |
47 | # I would expect something like ``pyenv init; pyenv local $PYTHON`` or | |
48 | # ``pyenv shell $PYTHON`` would work, but ``pyenv init`` doesn't seem to | |
49 | # modify the Bash environment. ??? So, I hand-set the variables instead. | |
50 | export PYENV_VERSION=$PYTHON | |
51 | export PATH="/Users/travis/.pyenv/shims:${PATH}" | |
52 | pyenv-virtualenv venv | |
53 | source venv/bin/activate | |
33 | if [ ! -z "$CONDA" ]; then | |
34 | if [ "$TRAVIS_OS_NAME" == "osx" ]; then | |
35 | curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh --output miniconda.sh | |
36 | fi | |
37 | chmod +x miniconda.sh | |
38 | ./miniconda.sh -b | |
39 | export PATH=$HOME/miniconda3/bin:$PATH | |
40 | conda update --yes conda | |
41 | conda create --yes -n travis python=$CONDA | |
42 | source activate travis | |
54 | 43 | # A manual check that the correct version of Python is running. |
55 | 44 | python --version |
56 | 45 | fi |