-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
65 lines (55 loc) · 1.72 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
sudo: false
language: python
cache: pip
branches:
only:
- master
os: linux
python:
- "2.7"
- "3.6"
env:
- PIPENV_SHELL_COMPAT=true PIPENV_COLORBLIND=true PIPENV_NOSPIN=true
matrix:
include:
- os: osx
language: generic
env: PYTHON=2.7.14
- os: osx
language: generic
env: PYTHON=3.6.4
before_install: |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
# Per the `pyenv homebrew recommendations <https://github.com/yyuu/pyenv/wiki#suggested-build-environment>`_.
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 <https://github.com/yyuu/pyenv-virtualenv/blob/master/README.md>`_.
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
# A manual check that the correct version of Python is running.
python --version
fi
install:
- python -m pip install -U pip
- python -m easy_install -U setuptools
- pip install --upgrade setuptools pip wheel pipenv
- pipenv install --dev --system
script:
- python -m pytest --cov=./
after_success:
- codecov
notifications:
email:
on_success: never
on_failure: change