-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
executable file
·56 lines (49 loc) · 2.36 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
sudo: false
language: python
python:
- "3.6"
dist: trusty
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
matrix:
include:
- python: 3.7
dist: xenial
sudo: true
env:
- PEP8_IGNORE="E221,E501,W504,W391,E241"
# command to install dependencies
install:
- pip install --upgrade pip setuptools
- pip install tensorflow
- pip install -r requirements.txt
# command to run tests
# require 100% coverage (not including test files) to pass Travis CI test
# To skip pypy: - if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then DOSTUFF ; fi
script:
- export MAJOR_PYTHON_VERSION=`echo $TRAVIS_PYTHON_VERSION | cut -c 1`
- coverage run --source=bert
$(which nosetests) -v
--with-doctest tests/
--exclude-dir tests/nonci/
- if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then coverage report --show-missing --fail-under=60 --omit "bert/tokenization/*_tokenization.py" ; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then pycodestyle --ignore=$PEP8_IGNORE --exclude=tests,.venv -r --show-source . ; fi
# For convenience, make sure simple test commands work
- python setup.py develop
# - py.test
# - nosetests -e tests.nonci.*
# load coverage status to https://coveralls.io
after_success:
- 'echo travis-python: $TRAVIS_PYTHON_VERSION'
- if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then pip install coveralls; COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN coveralls ; fi
notifications:
email: false
deploy:
provider: pypi
username: charlesXu86
password:
secure: i1gPrU01z5rN/hNvabvOWd4eKXMkoWOHUB8By7dj+EW7rO+NumdRGSPEWJ2nZX0Xq0Mx3MA/tM1ZCd/ADz7pn7mFq0FzOSYSii56tsJWaSkszmUUHc/GvJXzE2DUsGI0pDgaaA6FYdCJ5DX9Rbt20kVkPieUL7dB4OdNWZv3QbF00ivyBkO22r1QC1FV4nq++EHb/F+yIbvoKQrL/DpkdfPfvhhSdsW/1DtIlNl2swIQKKoqiGz6YUUgnaSWw8z+8ybHvlBbWpokjaVEFVZrygCwj8DWEG9TTkGTaBYiBbAzr6vgcSqQWzrVFlZeBYNBfj76JHj1XuK4vvXhs7A3s3oXbSEe993thmSEM/hMq45XsBNH9FBZxKiNJUnOpW6y1ErpHLwhcqeFH75RCrrSdn9bFq+Rv8bpfYlHJgm6Dj12Gczav5keixOwmvCbiQlYxmt44xvp2OJ66obc50AmWwk8/OAa+zgu4Tu74Y/8nQeLUfDWPSPHcsTfsuvSemcATXKVV8XZFH0vCkRvtXEAEskx2jqWgMFRAp5u/6bng1dTlojftZohJe/mU6f3JHRaM5TiADq7PQSZfMQPp1zBOUiwTLALPAEupXvfV2woM+iy4WYWgyXZYSz9/xdQ0yWBsHsA9AEP45I2COSIpsIruKnjShhqbYJHIwB+M0NUIIA=
on:
tags: true
branch: master
condition: "$TRAVIS_PYTHON_VERSION = 3.7"
skip_existing: true