Skip to content

Commit

Permalink
Merge pull request #28 from Suor/travis
Browse files Browse the repository at this point in the history
Add tox and Travis CI configs for py27, py33, py34
  • Loading branch information
kmike committed Feb 26, 2015
2 parents 6e36995 + ee25440 commit 225cc76
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: python
python:
- "2.7"
- "3.3"
- "3.4"
install:
install:
- deps='lxml numpy scipy scikit-learn cython numpydoc'
# Download Miniconda
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget http://repo.continuum.io/miniconda/Miniconda-3.4.2-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-3.4.2-Linux-x86_64.sh -O miniconda.sh;
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 conda
# Useful for debugging any issues with conda
- conda info -a

# Replace dep1 dep2 ... with your dependencies
- conda create -n test-environment python=$TRAVIS_PYTHON_VERSION $deps
- source activate test-environment
- pip install -r requirements-dev.txt # whatever not installed by conda
- python setup.py install
script:
- sh runtests.sh
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
nose
numpydoc
coverage
tox
1 change: 1 addition & 0 deletions requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
numpydoc
sphinx
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
lxml
numpy
scipy
scikit-learn >= 0.14
cython >= 0.19
-e git+https://github.com/adsva/python-wapiti.git@f7eded69a951c50a461cbe62ecc809e28229eb8f#egg=python-wapiti
Expand Down
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[tox]
envlist = py27, py33, py34, docs

[testenv]
whitelist_externals = sh
deps = -r{toxinidir}/requirements-dev.txt
commands = sh ./runtests.sh {posargs}

[testenv:docs]
deps = -r{toxinidir}/requirements-doc.txt
changedir = docs
commands = sphinx-build -b html . _build/html

0 comments on commit 225cc76

Please sign in to comment.