-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
50 lines (47 loc) · 1.24 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
language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
- 3.5
- 3.5-dev
- pypy
- pypy3
- nightly
matrix:
fast_finish: true
include:
- python: 3.5
env: RUN_LINTS=true
cache: pip
before_install:
- |
case "$TRAVIS_PYTHON_VERSION" in
pypy) export PYPY_VERSION="pypy-2.6.1" ;;
pypy3) export PYPY_VERSION="pypy3-2.4.0" ;;
esac
if ! [ -z "$PYPY_VERSION" ] ; then
export PYENV_ROOT="$HOME/.pyenv"
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
pushd "$PYENV_ROOT" && git pull && popd
else
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
fi
"$PYENV_ROOT/bin/pyenv" install "$PYPY_VERSION"
virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
fi
if [ "$RUN_LINTS" = "true" ]; then
pip install pre-commit
else
pip install codeclimate-test-reporter coverage nose pytest
fi
script:
- |
if [ "$RUN_LINTS" = "true" ] ; then
pre-commit run --all-files
else
coverage run --include='*string_generator.py' -m pytest
codeclimate-test-reporter
fi