forked from Unidata/MetPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
96 lines (85 loc) · 2.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
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
86
87
88
89
90
91
92
93
94
95
96
language: python
dist: bionic
os: linux
branches:
except:
- /^dependabot-.*$/
addons:
apt:
packages:
- libproj-dev
- libgeos-dev
git:
depth: 150
python:
- 3.8
- 3.7
- 3.6
cache:
- pip
env:
global:
- GH_PAGES_DIR="$HOME/gh-pages"
- VERSIONS="Current.txt"
jobs:
- TASK="coverage"
- TASK="docs"
jobs:
include:
- python: 3.6
env:
- VERSIONS="Minimum"
- TASK="coverage"
- python: "3.8-dev"
env:
- VERSIONS="Prerelease"
- GIT_VERSIONS="git+git://github.com/hgrecco/pint@master#egg=pint git+git://github.com/pydata/xarray@master#egg=xarray"
- python: "3.8-dev"
env:
- TASK="docs"
- VERSIONS="Prerelease"
- GIT_VERSIONS="git+git://github.com/hgrecco/pint@master#egg=pint git+git://github.com/pydata/xarray@master#egg=xarray"
allow_failures:
- python: "3.8-dev"
before_install:
# We hard-code the sphinx_rtd_theme to lock in our build with patch for
# version chooser
- python -m pip install --upgrade pip setuptools
- python -m pip install --no-binary ":all:" shapely
# Needed in order to build CartoPy--it needs it installed first
- python -m pip install -c ci/${VERSIONS} numpy
- if [[ $TASK == "docs" ]]; then
python -m pip install -f https://unidata-python.s3.amazonaws.com/wheelhouse/index.html sphinx_rtd_theme==0.2.5b1.post1 -c ci/${VERSIONS};
python -m pip install -r ci/doc_requirements.txt -r ci/extra_requirements.txt -c ci/${VERSIONS} ${GIT_VERSIONS};
else
python -m pip install -r ci/test_requirements.txt -r ci/extra_requirements.txt -c ci/${VERSIONS} ${GIT_VERSIONS};
fi;
install:
- python -m pip install . -c ci/${VERSIONS}
script:
- export TEST_DATA_DIR=${TRAVIS_BUILD_DIR}/staticdata;
- export NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1;
- if [[ $TASK == "docs" ]]; then
pushd docs;
if [[ $TRAVIS_PYTHON_VERSION == "3.8" ]]; then
export LINKCHECK="linkcheck";
fi;
make clean overridecheck html $LINKCHECK O=-W;
export DOC_BUILD_RESULT=$?;
popd;
if [[ $DOC_BUILD_RESULT -ne 0 ]]; then
false;
fi;
else
python -m coverage run -p -m pytest --mpl -W error::metpy.deprecation.MetpyDeprecationWarning tests/;
python -m coverage combine;
python -m coverage report;
python -m coverage xml;
fi
after_script:
- if [[ $TASK != "coverage" ]]; then
pip install codecov codacy-coverage;
coverage xml;
codecov -X gcov -f coverage.xml -e TRAVIS_PYTHON_VERSION;
python-codacy-coverage -r coverage.xml;
fi