forked from microscopium/microscopium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (46 loc) · 1.55 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
language: python
sudo: false
python:
- 2.7
- 3.5
virtualenv:
system_site_packages: false
before_install:
- export DISPLAY=:99.0
- export CONDA=$HOME/miniconda
- export PATH="$CONDA/bin:$PATH"
# install conda, but only if it's not present already... Yay caching!
- command -v conda > /dev/null || {
wget http://repo.continuum.io/miniconda/Miniconda-3.7.0-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -f -p $CONDA; }
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- source activate mic-test || {
conda create -q -n mic-test python=$TRAVIS_PYTHON_VERSION;
source activate mic-test;}
- conda install numpy scipy pillow scikit-learn scikit-image toolz cytoolz pandas setuptools pip pymongo matplotlib six h5py
- pip install pytest coverage pytest-cov sh
- pip install coveralls
before_script:
- sleep 15
- mongo mydb_test --eval 'db.addUser("travis", "test");'
script:
- python setup.py develop
- py.test
after_success:
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then coveralls; fi
before_cache:
# clean unused packages & installed files from conda cache
# This reduces cache rebuilds
# Copied from
# https://github.com/uwescience/shablona/blob/0246556f692fdeb65ba9354e94565e6181ff993c/.travis.yml#L47
- conda clean --tarballs --packages --index-cache
- rm -rf $HOME/miniconda/pkgs/cache
- xargs rm < installed_files.txt
cache:
directories:
- $HOME/miniconda
- $HOME/.matplotlib
services:
mongodb