forked from SciTools/cartopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (78 loc) · 3.27 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
language: python
env:
matrix:
# These ancient versions are linked to an old libgfortran, but that version
# isn't pinned in the package metadata
- PYTHON_VERSION=2.7
PACKAGES="cython=0.17 numpy=1.10.0 matplotlib=1.5.1 nose proj4=4.9.1 scipy=0.16.0 libgfortran=1 mock"
- PYTHON_VERSION=3.5
PACKAGES="cython=0.23.1 numpy=1.10.0 matplotlib=1.5.1 nose proj4=4.9.1 scipy=0.16.0 libgfortran=1"
PYTHONHASHSEED=0 # So pytest-xdist works.
- NAME="Latest everything."
PYTHON_VERSION=3.6
PACKAGES="cython numpy matplotlib-base proj4 pykdtree scipy fiona"
- NAME="Latest everything (py2k)."
PYTHON_VERSION=2
PACKAGES="cython numpy matplotlib proj4 scipy mock"
sudo: false
git:
# Because we check the history of every file, we need to have
# a deep clone of the repo.
depth: 10000
install:
# Install miniconda
# -----------------
- if [[ "$PYTHON_VERSION" == 2* ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
# Create the basic testing environment
# ------------------------------------
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls yes
- conda config --add channels conda-forge
- conda config --add channels conda-forge/label/testing
- ENV_NAME="test-environment"
- conda create -n $ENV_NAME python=$PYTHON_VERSION
- source activate $ENV_NAME
# Customise the testing environment
# ---------------------------------
- PACKAGES="$PACKAGES pillow pytest pytest-xdist filelock pep8 pyshp shapely six requests pyepsg owslib"
- conda install --quiet $PACKAGES
# Conda debug
# -----------
- conda list -n $ENV_NAME
- conda list -n $ENV_NAME --explicit
- conda info -a
- MPL_CONFIG_DIR=~/.config/matplotlib
- mkdir -p $MPL_CONFIG_DIR
- echo "backend" ":" "agg" > $MPL_CONFIG_DIR/matplotlibrc
# Install cartopy
# ---------------
- pip install --no-deps .
- python -c "import cartopy; print('Version ', cartopy.__version__)" && python setup.py version
script:
# Check that the downloader tool at least knows where to get the data from (but don't actually download it)
- python $TRAVIS_BUILD_DIR/tools/feature_download.py gshhs physical --dry-run
- if [[ "$NAME" == "Latest everything"* ]]; then
CARTOPY_GIT_DIR=$TRAVIS_BUILD_DIR pytest -n 4 --doctest-modules --pyargs cartopy;
else
CARTOPY_GIT_DIR=$TRAVIS_BUILD_DIR pytest -n 4 --pyargs cartopy;
fi
after_failure:
- source activate $ENV_NAME
- python -c "from __future__ import print_function; import cartopy.tests.mpl; print(cartopy.tests.mpl.failed_images_html())"
deploy:
- provider: pypi
user: scitools-cartopy
# travis encrypt <password>
password:
secure: Wbc/NQkcEsWVGn3hTemLbaDond6dtAO46Q6PVSS0GiL9RU0bH6QIpLq34JV5hKRuhooFp8WaU49OJsH71iMB4Utrr1y8olkwpTuq7BBsuZGSHtStX0T4UKUCAHynlLnCEqIyBBDIWFsIy6OnLZDnKmPkqLW8IdQfk0aWl0mDv5w=
distributions: sdist
upload_docs: false
on:
repo: SciTools/cartopy
condition: $NAME == "Latest everything."
tags: true