forked from ExeClim/Isca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
60 lines (53 loc) · 1.5 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
language: minimal
notifications:
email: false
branches:
only:
- master
env:
global:
- GFDL_BASE=$TRAVIS_BUILD_DIR
- GFDL_ENV="$TRAVIS_BUILD_DIR/src/extra/env/ubuntu_conda"
- GFDL_WORK="$HOME/gfdl_work"
- GFDL_DATA="$HOME/gfdl_data"
- GFDL_PYDIR="$TRAVIS_BUILD_DIR/src/extra/python"
- GH_PAGES_DIR="$HOME/gh-pages"
matrix:
fast_finish: true
include:
- env: CONDA_ENV=docs
- env: CONDA_ENV=py37
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
- conda config --add channels conda-forge
- conda update -q conda
- conda info -a
install:
- if [[ "$CONDA_ENV" == "docs" ]]; then
conda env create -n test_env --file docs/environment.yml;
else
conda env create -n test_env --file ci/environment_$CONDA_ENV.yml;
fi;
- source $GFDL_ENV
- source $HOME/miniconda/etc/profile.d/conda.sh
- conda activate test_env
- conda list
- cd $GFDL_PYDIR
- pip install -e .
- cd $GFDL_BASE
script:
- if [[ "$CONDA_ENV" == "docs" ]]; then
sphinx-build -n -b html -d docs/_build/doctrees docs/source docs/_build/html;
else
travis_wait 30 pytest -v;
fi;
after_success:
- if [[ "$CONDA_ENV" == "docs" ]]; then
bash ci/deploy_docs.sh;
else
echo "Here be conda upload command";
fi;