forked from aleju/imgaug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (54 loc) · 2.07 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: required
dist: trusty
language:
- python
- cpp
env:
global:
- CODACY_PROJECT_TOKEN=1370ce38e99e40af842d47a8dd721444
cache:
directories:
- $HOME/.cache/pip
python:
- "2.7"
# - "3.2" # downloads np 1.17 on travis (?!), which doesn't support 3.2
# - "3.3" # downloads np 1.17 on travis (?!), which doesn't support 3.3
- "3.4"
- "3.5"
- "3.6"
# - "3.7" # python version cannot be installed on travis
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq -y python-virtualenv
install:
# TODO why was this deactivated?
# - virtualenv venv
# - . venv/bin/activate
- pip install -r requirements.txt
# Added --upgrade, because at least pytest already came from some other
# install command and so version was never checked
- pip install --upgrade -r test/requirements.txt
- pip install coverage codecov pytest-cov codacy-coverage
- pip install .
before_script:
- pip install flake8
# Stop the build if there are Python syntax errors or undefined names.
#
# We exclude poly_point_isect.py because it is incompatible with python2
# and poly_point_isect_py2py3.py is actually used instead. The incompatible
# file exists in the repo only for comparison. There are some other patterns
# added to --exclude, which are the default values for flake8's exclude
# option.
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude=".svn,CVS,.bzr,.hg,.git,__pycache__,poly_point_isect.py"
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# currently deactivated as style guidelines are not yet kept in the project
# TODO change this
#- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
script:
- python -m pytest --verbose --xdoctest-modules --ignore="test/run_all.py" -s --durations=50
- coverage run --source imgaug -m pytest --verbose --xdoctest-modules --ignore="test/run_all.py"
after_success:
- codecov -t feeff9b2-3750-4246-befb-8cde60dc28aa
- coverage xml
- python-codacy-coverage -r coverage.xml
- coverage report