-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
62 lines (52 loc) · 1.98 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
language: python
matrix:
include:
# Use the built in venv for linux builds
- os: linux
sudo: required
python: "3.7.3"
dist: xenial
# Use generic language for osx; taken from https://pythonhosted.org/CodeChat/.travis.yml.html
# - os: osx
# language: generic
# env: PYTHON=3.6.6
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
export BOTO_CONFIG=/dev/null
install:
- python --version
- python -m pip install -U pip
- python -m easy_install -U setuptools
# command to install dependencies; includes extra 'test' specific dependencies
- pip install -e .[test]
script:
# for codecov support
- pip install -U pytest
- pip install -U pytest-cov
# to report installed packages
- pip freeze
# command to run tests
- cd tests
- pytest --cov-config ../.coveragerc --cov=../ ./
after_success:
- bash <(curl -s https://codecov.io/bash)