forked from geopandas/geopandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (53 loc) · 2.41 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
language: python
sudo: false
matrix:
include:
# One build with minimum versions of dependencies
- env: ENV_FILE="ci/travis/35-minimal.yaml"
# one build with no optional dependencies
- env: ENV_FILE="ci/travis/38-no-optional-deps.yaml"
# Python 3.6 test all supported Pandas versions
- env: ENV_FILE="ci/travis/36-pd023.yaml" PYGEOS=true
- env: ENV_FILE="ci/travis/36-pd024.yaml" PYGEOS=true
- env: ENV_FILE="ci/travis/37-latest-defaults.yaml" STYLE=true PYGEOS=true
- env: ENV_FILE="ci/travis/37-latest-conda-forge.yaml" PYGEOS=true
- env: ENV_FILE="ci/travis/38-latest-conda-forge.yaml" PYGEOS=true POSTGIS=true PGUSER=postgres PGPASSWORD=postgres
- env: ENV_FILE="ci/travis/37-dev.yaml" DEV=true PYGEOS=true
allow_failures:
- env: ENV_FILE="ci/travis/37-dev.yaml" DEV=true PYGEOS=true
before_install:
- chmod +x ci/travis/setup_postgres.sh
install:
# Install conda
- wget https://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"
- conda config --set always_yes yes --set changeps1 no
- conda update conda
- conda info
# free channel needed for older envs (< py37), see
# https://github.com/conda/conda/issues/8849
- conda config --set restore_free_channel true
# Install dependencies
- conda env create --file="${ENV_FILE}"
- source activate test
- if [ "$DEV" ]; then pip install git+https://github.com/pydata/pandas.git; fi
- if [ "$DEV" ]; then pip install git+https://github.com/matplotlib/matplotlib.git; fi
- if [ "$DEV" ]; then pip install git+https://github.com/Toblerity/Shapely.git; fi
- if [ "$STYLE" ]; then pip install black flake8; fi
- if [ "$POSTGIS" ]; then conda install postgis -c conda-forge; fi
- pip install -e .
# List environment
- conda list
- python -c "import geopandas; geopandas.show_versions();"
# Set-up database
- if [ "$POSTGIS" ]; then ci/travis/setup_postgres.sh; fi
script:
- echo "Testing without PyGEOS"
- USE_PYGEOS=0 pytest geopandas -v -r s --cov geopandas --cov-report term-missing
- if [ "$PYGEOS" ]; then echo "Testing with PyGEOS"; fi
- if [ "$PYGEOS" ]; then USE_PYGEOS=1 pytest geopandas -v -r s --cov-append --cov geopandas --cov-report term-missing; fi
- if [ "$STYLE" ]; then black --check geopandas; fi
- if [ "$STYLE" ]; then flake8 geopandas; fi
after_success:
- codecov