-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.travis.yml
84 lines (70 loc) · 2.89 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
language: python
sudo: false
cache:
directories:
- $HOME/miniconda
env:
global:
- secure: "pnfW9b6SpYSWmWPAvTygkOWUjohSOCC+vH4i1lXiGXOG1UUK6F0GsJNEts0SlLvY9Qy4dfrFzyJWEIQ+UNsMOD/gruRgtVQpdzNkGgrAbkZmSpKGSZaj0kqlCPhSKsqOoX2eTaLZfMuW4U7x7h2OVTLE9RORN3kix5DnO9/O+AwVGTP+J55+YngGimWYfJnhP0ECpKNu1sKUf8ZAo2EQPW+8V4nA+QwtzmE+3AfXGSvHsbzMVbn1yRxLzps7vcj2YIufwTWHwE5JRGHMVo/0/Dk3DaORgPyUp19H78Nz4EgW5aiPuiMDdYkmf/RKcrxtMHXFPGBYh1u6RX+crfX3Nyxrbdip703bq/8JcElhzadQmIfQNwYXfC1tU8b67qYATerhXDgQD7EV0ummSbzYeZMJlNyp5Djoel+cDZ/+FFVQNYUJeiVxq8t1LS8iPo/8/ddguuuSQ2d1oPG/t8NgcezRXAug8B1fSce3PHdZALe2SQLubfYMC+q9Kq8vpsMTLYOJUNCywivDTGgv9iJ4ll0XTN2HKD8S+u9mRZTVLarN+dk9SioqppU9ttAYfZK/1Mv+fQ0WXOtutkaZoDSjli3WVFCLkLDuulXR8Y2jd1k1hrnNQ1ZtsEiUP2ASohsBnQM1RubRqj7ceGRhJsq5EfIPwBTh6hQj2UxoA/vrIig="
# Removing the directory will remove the env but leave the cached packages
# at $HOME/miniconda/pkgs. That is a win-win because when re-creating the
# env we will download only the new packages.
before_cache:
- rm -rf $HOME/miniconda/envs/TEST
services:
- postgresql
addons:
postgresql: "9.6"
apt:
packages:
- postgresql-9.6-postgis-2.4
matrix:
fast_finish: true
include:
- python: 3.6
env: TEST_TARGET=default
- python: 3.6
env: TEST_TARGET=docs
allow_failures:
- python: 3.6
env: TEST_TARGET=coding_standards
before_install:
- psql -U postgres -c "create extension postgis"
- psql -c "CREATE DATABASE test;" -U postgres
- |
URL="http://bit.ly/miniconda"
echo ""
if [ ! -f $HOME/miniconda/bin/conda ] ; then
echo "Fresh miniconda installation."
wget $URL -O miniconda.sh
rm -rf $HOME/miniconda
bash miniconda.sh -b -p $HOME/miniconda
fi
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
- conda update conda
- conda config --add channels conda-forge --force
# - pip install --upgrade http://github.com/miguelcleon/django-admin-shortcuts/zipball/master
install:
- conda create --yes -n TEST python=$TRAVIS_PYTHON_VERSION libgdal --file requirements.txt --file requirements-dev.txt
- source activate TEST
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install odm2admin-${version}.tar.gz && popd
script:
- if [[ $TEST_TARGET == 'default' ]]; then
python $TRAVIS_BUILD_DIR/manage.py test tests/;
fi
- if [[ $TEST_TARGET == 'coding_standards' ]]; then
find . -type f -name "*.py" ! -name "base.py" ! -name "conf.py" | xargs flake8 --max-line-length=100 --ignore=E402 ;
fi
- if [[ $TEST_TARGET == 'docs' ]]; then
set -e ;
conda install doctr ;
pushd docs ;
make clean html ;
popd ;
python -m doctr deploy --sync .;
python -m doctr deploy --sync --no-require-master --built-docs docs/build/html "docs-$TRAVIS_BRANCH" ;
fi
doctr:
require-master: true
sync: False