-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
66 lines (58 loc) · 1.97 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
62
63
64
65
66
language: python
python:
- 2.7
- 3.4
- 3.5
env:
before_install:
- export MINICONDA=$HOME/miniconda
- export PATH="$MINICONDA/bin:$PATH"
- hash -r
# Install gfortran (for instaseis)
- sudo apt-get update
- sudo apt-get install -qq gfortran
# Install conda only if necessary
- command -v conda >/dev/null || { wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -f -p $MINICONDA; }
- conda update --yes conda
- conda remove --yes -n condaenv --all
- conda create --yes -n condaenv python=$TRAVIS_PYTHON_VERSION
- conda install --yes -n condaenv pip
- source activate condaenv
# The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda
- sudo rm -rf /dev/shm
- sudo ln -s /run/shm /dev/shm
# These are mostly requirements of instaseis
- conda install --yes -c obspy nomkl obspy nose pytest flake8 sphinx h5py tornado python=$TRAVIS_PYTHON_VERSION
- conda install --yes -c conda-forge instaseis python=$TRAVIS_PYTHON_VERSION
- conda install --yes -c scitools cartopy
- travis_retry pip install $PIP_DEPS
- pip install coveralls
- pip install requests responses
- pip install tqdm
install:
#- pip list
#- git clone https://github.com/krischer/instaseis.git
#- cd ./instaseis
#- git status
#- pip list
#- pip install --no-deps -v -e .
#- pip list
#- cd ..
## Instaseis should not be tested itself, therefore removing
##- rm -rf ./instaseis
- python setup.py install --record installed_files.txt
script:
- nosetests -v --with-coverage --cover-package=stfinv -I instaseis
- flake8 --ignore E402,N802,N806 `find stfinv/* -name \*.py | grep -v setup.py | grep -v /doc/`
after_success:
- coveralls
before_cache:
# clean unused packages & installed files from conda cache
# this makes the cache rebuilt less frequently
- conda clean --yes --tarballs --packages --index-cache
- rm -rf $HOME/miniconda/pkgs/cache
- xargs rm <installed_files.txt
cache:
directories:
- $HOME/miniconda