-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
41 lines (35 loc) · 1.56 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
language: python
python:
- "2.7"
- "3.5"
- "3.6"
env:
global:
secure: "I7YRXirCGWcerGJi3NDEYvpPrZhSHmnByk7bIh7mcp4mtyQ8pNx8AfdvxH1ZkCpnXRJyN9gtJd9pomlbczdPgam/0TR9kpK7KQK8FQ5zy/GI5Y/WbKozzXWbpVDNxCaVKX0oFLGDUxyWy6FcKxDLrvyrV3N1dfaX9GoZmVJ6yUk="
before_install:
# The next two 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
# Install pandoc.
- sudo apt-get install -qq pandoc
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda update --yes conda
- conda create --yes -n condaenv python=$TRAVIS_PYTHON_VERSION
- conda install --yes -n condaenv pip
- source activate condaenv
- conda install --yes -c conda-forge obspy pytest mock python=$TRAVIS_PYTHON_VERSION
# build doc only on Python 2.7
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda install --yes sphinx; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install sphinx-readable-theme runipy ; fi
- pip install flake8 coveralls # Make sure this is up-to-date (don't use conda).
install:
- pip install --no-deps -v -e .
script:
- coverage run --source=src/pyflex -m pyflex.tests
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then cd $TRAVIS_BUILD_DIR/doc; make html ; fi
after_success:
- cd $TRAVIS_BUILD_DIR; coveralls
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then bash $TRAVIS_BUILD_DIR/.travis-update-gh-pages.sh ; fi