forked from daviddrysdale/python-phonenumbers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (49 loc) · 1.22 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
language: python
python:
# - "2.5"
# - "2.6"
- "2.7"
# - "pypy-5.4"
# - "3.0"
# - "3.1"
# - "3.2"
# - "3.3"
- "3.4"
- "3.5"
- "3.6"
- "pypy3"
sudo: false
jobs:
include:
- python: "3.7" # 3.7.0 pip 10.0.1
dist: xenial # required for "3.7"
install:
- |
if [ "$TRAVIS_PYTHON_VERSION" = "2.7" ]; then
pip install coveralls
fi
- pip install protobuf
- pip install pycodestyle
script:
- make -C tools/python metaclean
- make -C tools/python test
- make -C tools/python lint
- |
# Check re-generation didn't change anything (except locale.py)
git checkout -- python/phonenumbers/geodata/locale.py
status=$(git status --porcelain ) || :
if [[ -n ${status} ]]; then
echo "Regenerated files differ from checked-in versions: ${status}"
git status
exit 1
fi
- |
if [ "$TRAVIS_PYTHON_VERSION" = "2.7" ]; then
cd python
COVERAGE_FILE=main.cov coverage run --source=phonenumbers ./testwrapper.py
COVERAGE_FILE=pb2.cov coverage run --source=phonenumbers.pb2 ./testpb2.py
coverage combine main.cov pb2.cov
cd ..
fi
after_success:
- cd python && coveralls && cd ..