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 ..