-
Notifications
You must be signed in to change notification settings - Fork 38
/
.travis.yml
85 lines (75 loc) · 2.44 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
language: python
env:
global:
# Doctr deploy key for ajdawson/windspharm
- secure: "gRWSAM7JnHeIFx6QldIPvQf9XBWzm9lLjjGYvmCez6MDTGxtlEhF5yvNmX9m/f/WtoqLcw+/w7L198GUT8FUwZZ2wsHPhwePJalqdbIatN3QW2q0KHHj36Ob9UZDf9I7ni4XtPZsmm8eSx/f818PJktgGLbmKipNfWyRwkr7tXY="
- UVCDAT_ANONYMOUS_LOG=no
- PACKAGES_DEFAULT="setuptools pytest numpy pyspharm"
- PACKAGES_EXTRA="cdms2 genutil iris xarray"
matrix:
include:
- python: 2.7
env:
- SUITE_TYPE=test_standard
- python: 2.7
env:
- SUITE_TYPE=test_extras
- python: 3.6
env:
- SUITE_TYPE=test_standard
- python: 3.6
env:
- SUITE_TYPE=test_extras
- python: 3.6
env:
- SUITE_TYPE=deploy
sudo: false
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
- conda config --add channels conda-forge
- conda update conda
- conda info -a
install:
- conda create -n test python=$TRAVIS_PYTHON_VERSION
- source activate test
- if [[ $SUITE_TYPE = test_standard ]]; then
conda install $PACKAGES_DEFAULT;
elif [[ $SUITE_TYPE = test_extras ]]; then
conda install $PACKAGES_DEFAULT $PACKAGES_EXTRA;
else
conda install $PACKAGES_DEFAULT $PACKAGES_EXTRA sphinx doctr;
fi
- python setup.py install
script:
# Fail on error to avoid building documentation when the tests don't pass
- set -e
# Run the test suite
- pytest -vrsx
# Deploy the documentation. By default doctr only works on the master
# branch. We also want to deploy when building a tag, which requires
# post-processing to update the "latest" symlink.
- if [[ $SUITE_TYPE = "deploy" ]]; then
cd docs && make html && cd ..;
doctr -V;
if [[ -n "$TRAVIS_TAG" ]]; then
doctr deploy --build-tags --command './update_links.py && git add latest' "${TRAVIS_TAG%.*}";
else
doctr deploy dev;
fi;
fi
deploy:
provider: pypi
user: ajdawson
password:
secure: "kPR7n+oFtdOi1SoEsg0hDu9bmgBwyNDELhIBs+FqmStszF+N3WVME35n4skrb6L1/NtjmACnV3BZZkJTCALGX7IX4tO08SCyS4IlPPOOGukgQ54/5hTYpxU4q2dON7AVFQ/VEe56mxPd5shR+sxkdLJ6tZRzQuc5eN9/Uu2p1Mk="
upload_docs: no
on:
repo: ajdawson/windspharm
tags: true
condition: '$SUITE_TYPE == "deploy"'
notifications:
email: false