-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
89 lines (76 loc) · 2.95 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
language: python
sudo: required
cache:
directories:
- $HOME/miniconda
env:
global:
- secure: "ckOXS/SsEQGGI6XrdJbEhImPbMyB8HBIqGWJ7CkYKezKTTyuJ510LMAK/7xFLyMQ0rXIrHVpCZsGLsAuzK+h2D0/xQTvkLlxJkTkKwKnm6HKg6fOrbEVSAOzCKYAdP+nBpNLGA/kzMW26E+MSWuFQwc7JiKj36vW9uUgRiT8Knwl9YrfRG+Et1bWJIfbfNoBy2gP3eFXyLBKOcgR0E0y2dyst/uRwkkEn9m8as+PWc3zsVaFS6qf5L4OFMLI5z/EZiNXiu5B/AUvpesWT/OXsbpwnxShska3RXZIh+0exu8euop7Oi4o07PI7EasMtncWzjWKLB6hJaz/BRfS/fjH0/Isy64OUXCIaCwQew31e2uW/liYnlNY/PDJfiVYdbMR34YLLrstCdBjHG+l29eN0VrCKrhW9RDPVW5eKZD1EsQPUgEDpYHaigJBwuAguQ0/MMaZ7Z/DVOR4yUsNlKFO7VwdUL4+lQ3mHrdUAEhuZACncZJ03wouvtyiuGC2WPnPAvk97uHwUcJl7Mq/jTy7HrnTRytHVIHZ8LsymAaGL2ukjVLlJ8ex8/36v2glQEkPAT06f9JXkbWJRzutnDiFKli96shMM17qyl2rjjFdC+fVDm7L7xsgJDAgXAuhD9Wwj3iVo/fcz7SmcH+iEekRtgqwbzaT3MbmLRpS4tOarY="
# 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:
- mysql
- postgresql
addons:
postgresql: "9.5"
apt:
packages:
- postgresql-9.5-postgis-2.3
- mysql-server-5.6
matrix:
fast_finish: true
include:
- python: 2.7
env: TEST_TARGET=default
- python: 3.6
env: TEST_TARGET=default
- python: 2.7
env: TEST_TARGET=coding_standards
- python: 3.6
env: TEST_TARGET=docs
allow_failures:
- python: 3.6
env: TEST_TARGET=default
before_install:
- ./ci-helpers/mysql_setup.sh
- ./ci-helpers/postgres_setup.sh
- |
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
- conda create --name TEST python=$TRAVIS_PYTHON_VERSION --file requirements.txt --file requirements-dev.txt
- source activate TEST
install:
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install odm2api-${version}.tar.gz && popd
script:
- if [[ $TEST_TARGET == 'default' ]]; then
cp -r tests /tmp && cd /tmp ;
py.test -vv tests ;
fi
- if [[ $TEST_TARGET == 'coding_standards' ]]; then
find . -type f -name "*.py" ! -name 'conf.py' ! -name '_version.py' ! -name 'versioneer.py' ! -name '*DBConfig.py' ! -name 'Sample.py' | xargs flake8 --max-line-length=110 ;
fi
- if [[ $TEST_TARGET == 'docs' ]]; then
set -e ;
conda install doctr ;
pushd docs ;
make clean html linkcheck ;
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