Skip to content

Commit 801c789

Browse files
author
LeeKamentsky
committed
Merge pull request #34 from jakirkham/add_travis
Attempt to add Travis CI support
2 parents 6fbcf10 + b8eeaf9 commit 801c789

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

.coveragerc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[run]
2+
branch = True
3+
erase = True
4+
package = bioformats
5+
[report]
6+
exclude_lines =
7+
# Ignore continue statement in code as it can't be detected as covered
8+
# due to an optimization by the Python interpreter. See coverage issue
9+
# ( https://bitbucket.org/ned/coveragepy/issue/198/continue-marked-as-not-covered )
10+
# and Python issue ( http://bugs.python.org/issue2506 ).
11+
continue
12+
13+
# Ignore coverage of code that requires the module to be executed.
14+
if __name__ == .__main__.:
15+
omit =
16+
*/python?.?/*
17+
*/site-packages/*
18+
*tests/*

.travis.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
language: java
2+
env:
3+
- PYTHON_VERSION="2.7"
4+
before_install:
5+
# Get the tag if it wasn't provided. Travis doesn't provide this if it isn't a tagged build.
6+
- if [ -z $TRAVIS_TAG ]; then TRAVIS_TAG=`git tag --contains` ; fi
7+
- echo $TRAVIS_TAG
8+
# Move out of git directory to build root.
9+
- cd ../..
10+
- pwd
11+
install:
12+
# Download and configure conda.
13+
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
14+
- bash miniconda.sh -b -p $HOME/miniconda
15+
- export PATH="$HOME/miniconda/bin:$PATH"
16+
- conda config --set always_yes yes
17+
- conda config --set show_channel_urls True
18+
- source activate root
19+
# Install basic conda dependencies.
20+
- touch $HOME/miniconda/conda-meta/pinned
21+
- echo "conda-build ==1.16.0" >> $HOME/miniconda/conda-meta/pinned
22+
- conda update --all
23+
- conda install conda-build
24+
# Setup environment for testing and install all dependencies and our package.
25+
- cd $TRAVIS_REPO_SLUG
26+
- conda create --use-local -n testenv python=$PYTHON_VERSION
27+
- source activate testenv
28+
- conda install numpy
29+
- python setup.py install
30+
# Install sphinx to build documentation.
31+
- conda install sphinx
32+
# Install coverage and coveralls to generate and submit test coverage results for coveralls.io.
33+
- echo "coverage 3.*" >> $HOME/miniconda/envs/testenv/conda-meta/pinned
34+
- conda install nose
35+
- conda install coverage
36+
- pip install coveralls
37+
# Clean up downloads as there are quite a few and they waste space/memory.
38+
- conda clean -tipsy
39+
- rm -rfv $HOME/.cache/pip
40+
script:
41+
# Run tests.
42+
- python nosetests.py
43+
# Build docs.
44+
- cd docs
45+
- make html
46+
- cd ..
47+
#after_success:
48+
# Submit results to coveralls.io.
49+
#- coveralls
50+
# Use container format for TravisCI for quicker startup and builds.
51+
sudo: false

0 commit comments

Comments
 (0)