-
Notifications
You must be signed in to change notification settings - Fork 376
/
.travis.yml
33 lines (28 loc) · 934 Bytes
/
.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
dist: trusty
sudo: false
language: python
cache: pip
python:
- "2.7"
- "3.6"
# command to install dependencies
install:
- pip install -U pip
- pip -q install -r requirements.txt
# dev dependencies
- pip install flake8
- pip install coverage
# command to run tests
before_script:
# Syntax Checks
# stop the build if there are Python syntax errors or undefined names
- time flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- time flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Prepare data for integration test
- scripts/toy.sh
script:
# Unit test
- nosetests --with-coverage --cover-erase --cover-package=seq2seq
# Integration test
- "if [[ $TRAVIS_BRANCH =~ (master|develop) ]]; then python setup.py install && scripts/integration_test.sh; fi"