-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
61 lines (60 loc) · 1.92 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
57
58
59
60
61
#language: python
env:
- PYTHON_VERSION="2.7" NUMPY_VERSION="1.12.1"
- PYTHON_VERSION="3.5" NUMPY_VERSION="1.12.1"
- PYTHON_VERSION="3.6" NUMPY_VERSION="1.12.1"
- PYTHON_VERSION="3.7" NUMPY_VERSION="1.14.6"
# command to install dependencies
os:
- linux
- osx
install:
# Install conda
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi; else
if [[ "$PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda --yes
- conda create -n py -q --yes pip numpy=$NUMPY_VERSION scipy scikit-learn unidecode nltk chardet cython "python=$PYTHON_VERSION"
- source activate py
- which python
- which pip
- python --version
- pip --version
# command to install dependencies
- pip install coveralls
- python -c "import nltk; nltk.download('stopwords'); nltk.download('punkt')"
- pip install .
# command to run tests
before_script:
- pip install unittest2 nose
script: bash coverage.sh
after_success:
- coveralls
- pwd
- pip install wheel
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
python setup.py bdist_egg;
else
python setup.py bdist_wheel --plat-name=macosx_10_7_x86_64;
fi
- ls dist
addons:
artifacts:
paths:
- $(ls dist/*.whl | tr "\n" ":")
- $(ls dist/*.egg | tr "\n" ":")
target_paths:
- /$TRAVIS_OS_NAME/$TRAVIS_BUILD_NUMBER