/
.travis.yml
63 lines (58 loc) · 1.88 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
# Based on http://conda.pydata.org/docs/travis.html
language: python
sudo: false # use container based build
notifications:
email: false
matrix:
fast_finish: true
include:
- python: 2.7
env: CONDA_ENV="ci/environment-py27.yml"
- python: 2.7
env: CONDA_ENV="ci/environment-py27-pyfftw.yml"
- python: 3.6
env: CONDA_ENV="ci/environment-py36.yml"
- python: 3.6
env: CONDA_ENV="ci/environment-py36-pyfftw.yml"
- python: 3.7
env: CONDA_ENV="ci/environment-py37.yml"
- python: 3.7
env: CONDA_ENV="ci/environment-py37-pyfftw.yml"
- python: 3.8
env: CONDA_ENV="ci/environment-py38.yml"
- python: 3.8
env: CONDA_ENV="ci/environment-py38-pyfftw.yml"
- python: 3.6
env: CONDA_ENV="docs/environment.yml" DOCTEST="true"
before_install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget http://repo.continuum.io/miniconda/Miniconda-3.16.0-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-3.16.0-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 -q conda
- conda info -a
install:
- conda env create --file $CONDA_ENV
- source activate pyqg_test_env
# if we do this, the package gets installed into
# /home/travis/build/xgcm/xgcm/build/lib/xgcm
# - python setup.py install
- python setup.py build_ext --inplace
- pip install -e .
# this puts the package into
# /home/travis/build/xgcm/xgcm/xgcm
# That turns out to be necessary for py.test to correctly collect the tests
# and for coverage to work properly.
# It is very complicated and confusing.
script:
- if [ -z ${DOCTEST+x} ];
then py.test pyqg -v --cov=pyqg --cov-config .coveragerc --cov-report term-missing;
else cd docs; make html;
fi
after_success:
- codecov