forked from sukeesh/Jarvis
-
Notifications
You must be signed in to change notification settings - Fork 39
/
.travis.yml
45 lines (45 loc) · 1.16 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
language: python
matrix:
allow_failures:
- os: osx
include:
- os: linux
python: 2.7
cache: pip
env: TOXENV=py27
- os: osx
osx_image: xcode9.3
language: generic
cache: pip
sudo: required
env: TOXENV=py27
- os: linux
dist: xenial
sudo: true
python: 3.7
cache: pip
env: TOXENV=py37
- os: osx
language: generic
cache: pip
sudo: required
env: TOXENV=py37
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TOXENV" == "py27" ]; then
sudo -H pip2 install -r requirements.txt;
elif [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TOXENV" == "py37" ]; then
sudo -H pip3 install -r requirements.txt;
else
pip install -r requirements.txt;
fi
script:
- cd $TRAVIS_BUILD_DIR/
- flake8 --select E,W --max-line-length=140 --ignore E722,W503,W504,E128 jarviscli/
- cd jarviscli/
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TOXENV" == "py27" ]; then
python2 -m unittest discover;
elif [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TOXENV" == "py37" ]; then
python3 -m unittest discover;
else
python -m unittest discover;
fi