Skip to content

Commit 5cbaf82

Browse files
committed
Sets up travis.
1 parent 74afab4 commit 5cbaf82

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

.travis.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
os: linux
2+
dist: xenial
3+
group: stable
4+
language: python
5+
python:
6+
# Track Python version on future production machines, Debian Stretch.
7+
- 3.5
8+
sudo: required
9+
addons:
10+
apt:
11+
packages: []
12+
13+
before_install: {}
14+
install:
15+
- pip install -r requirements.txt
16+
# - pip install -r docs/requirements.txt
17+
- pip install -r test-requirements.txt
18+
- pip install twine
19+
script:
20+
- flake8 . --max-line-length=85 --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,docs
21+
- pytest --cov=mwtext -m "not nottravis"
22+
# - sphinx-build -anW -b html docs dist/docs
23+
# - sphinx-build -b linkcheck docs dist/docs
24+
after_success:
25+
- codecov
26+
notifications:
27+
irc:
28+
channels:
29+
- "chat.freenode.net#wikimedia-ai"
30+
on_success: change
31+
on_failure: change
32+
template:
33+
- "%{repository_slug}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} %{build_url}"
34+
35+
deploy:
36+
provider: script
37+
script: bash scripts/deploy.sh
38+
on:
39+
branch: master

scripts/deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python setup.py sdist bdist_wheel && twine upload dist/* --skip-existing --username $PYPI_USER --password $PYPI_PASS

test-requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pytest
2+
flake8
3+
codecov
4+
pytest-cov

0 commit comments

Comments
 (0)