forked from swtools/WOFpy
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.travis.yml
87 lines (73 loc) · 3.01 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
language: python
sudo: false
env:
global:
# Doctr deploy key for ODM2/WOFpy
- secure: "lewbC9uC+3aWaZdp0/lOWOl/5+pAIQR8yhbgISaZiE/cJCmBYQ9fpbhybjFfuai72/kzslT1gJTTSunx/Iwolpp1PwPv6EIqdeURntDTaXxIzxVCg2fYynrjY6GNgmPZRXWeBtE+Zp5+B1ixj8sVF8TKirKI5juORImM1XmiHnUQlnF8qoaalU+3dhNuKUMWfoYUujdarlJtr202skmC5cELx0F+DC+mLnDag+2s4zhG08syaay+VzD0e2Pl6++IHIfLQxENjubKQhXwTlryW7ixQ6TpnUYaUQ6wHKVkJtc1KQUvLH9K3olax6uLO1x1ksXoE+fOwoNHshWm21pr6FJLKL2Nl/oCuWkkNAuO5VH/VuyQNVRXAMV4/ivaFuZArnGODmD8HZuoqcfbUV20cLc5LfGRGxOWoCayLBdQ5mbJ/OF/ZyDUhyTKyzYICrzc4vPmNKtyxCQm0q/qNtG7j58AyByBDSy7qWNjBWYWZ5wnoQa3g8uGMKDWXR4LhbhF/IrDikqdT2+QdtNcC/WNqyC7eM1wc7YjEk4LzRkDI5rSXur+0GbhISQmAdGOHCKJwOK5a81NzKpJgD+Ck/jdbN/rxl62nUORuX19PFUE4DHzgBAFOrPHHGwd3N9UZUJa0Pwi3xwojHNqjIl7BWaQjmXfImAt7riEd5bcbsOxy74="
dist: trusty
services:
- postgresql
addons:
postgresql: "9.5"
apt:
packages:
- postgresql-9.5-postgis-2.3
matrix:
fast_finish: true
include:
- name: "default"
env: TEST_TARGET=default PY=2.7
- name: "cli"
env: TEST_TARGET=cli PY=2.7
- name: "build_cbi"
env: TEST_TARGET=build_cbi PY=2.7
- name: "docs"
env: TEST_TARGET=docs PY=2.7
allow_failures:
- name: "default-3.7"
env: TEST_TARGET=default PY=3.7
- python: 2.7
- name: "build_cbi"
env: TEST_TARGET=build_cbi PY=2.7
- name: "coding_standards"
env: TEST_TARGET=coding_standards PY=2.7
before_install:
- ./ci-helpers/postgres_setup.sh
- wget http://bit.ly/miniconda -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 --set show_channel_urls true
- conda update conda
- conda config --set show_channel_urls true
- conda config --add channels conda-forge --force
- conda create -n TEST python=$PY --file requirements.txt --file requirements-dev.txt
- source activate TEST
# Test source distribution.
install:
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install WOFpy-${version}.tar.gz && popd
before_script:
- python wof/examples/flask/swis/runserver_swis.py --config=./test/test_swis_config2.cfg --connection=sqlite:///./test/test_swis2.db &
script:
- if [[ $TEST_TARGET == 'default' ]]; then
pytest -s -rxs -v -k "not cbi" ;
fi
- if [[ $TEST_TARGET == 'build_cbi' ]]; then
python wof/examples/flask/cbi/build_cbi_cache.py ;
pytest -s -rxs -v -k "cbi" ;
fi
- if [[ $TEST_TARGET == 'cli' ]]; then
pushd /tmp ;
wofpy_config wofpyserver ;
wofpy_config wofpyserver --mode=production --overwrite=soft ;
wofpy_config wofpyserver -m production -o hard ;
popd ;
fi
- if [[ $TEST_TARGET == 'docs' ]]; then
set -e ;
pushd docs/Sphinx ;
make clean html ;
popd ;
source deactivate && conda create --name DOCTR python=3.7 doctr && source activate DOCTR ;
python -m doctr deploy --sync .;
python -m doctr deploy --sync --no-require-master --built-docs docs/Sphinx/_build/html "docs-$TRAVIS_BRANCH" ;
fi