-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
96 lines (78 loc) · 3.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
language: python
python:
- "2.7"
- "3.5"
cache:
directories:
- $HOME/.cache
sudo: false
compiler:
- gcc
addons:
postgresql: "9.4"
apt:
packages:
- postgresql-9.4-postgis-2.3
services:
- postgresql
before_install:
- nvm install v8
- npm install -g npm
- node --version
- npm --version
- main_path=$PWD
- build_path=$PWD/build
- mkdir -p $build_path
- girder_path=$build_path/girder
- rm -fr $girder_path
- GIRDER_VERSION=master
- git clone --branch $GIRDER_VERSION https://github.com/girder/girder.git $girder_path
- export MONGO_VERSION=3.2.18
- export PY_COVG="ON"
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "3" ]; then export PY3="true"; else export PY2="true"; fi
- CACHE=$HOME/.cache source $girder_path/scripts/install_mongo.sh
- mkdir /tmp/db
- mongod --dbpath=/tmp/db >/dev/null 2>/dev/null &
- mongod --version
- CACHE=$HOME/.cache CMAKE_VERSION=3.1.0 CMAKE_SHORT_VERSION=3.1 source $girder_path/scripts/install_cmake.sh
- cmake --version
- mkdir -p $HOME/.cache/node_modules || true
- ln -sf $HOME/.cache/node_modules .
- npm prune
- pip install -U pip virtualenv
install:
- cd $girder_path
- pip install -U -r requirements-dev.txt -e .
- girder-install plugin --symlink --dev $main_path
- pip install -e $main_path[all]
- girder-install web --plugins=database_assetstore --dev
before_script:
- psql -U postgres -c 'CREATE EXTENSION postgis;'
- psql -U postgres -c 'CREATE EXTENSION postgis_topology;'
- psql -U postgres -c 'CREATE EXTENSION postgis_sfcgal;' || true
- psql -U postgres -c 'CREATE EXTENSION fuzzystrmatch;'
- psql -U postgres -c 'CREATE EXTENSION address_standardizer;' || true
- psql -U postgres -c 'CREATE EXTENSION address_standardizer_data_us;' || true
- psql -U postgres -c 'CREATE EXTENSION postgis_tiger_geocoder;'
- psql -U postgres -c 'CREATE EXTENSION pgrouting;' || true
- psql -U postgres -c 'CREATE EXTENSION ogr_fdw;' || true
- psql -U postgres -c 'create database sampledb;'
script:
- mkdir -p $build_path/girder_testing_build
- cd $build_path/girder_testing_build
- cmake -DTEST_PLUGINS:STRING=database_assetstore -DRUN_CORE_TESTS:BOOL="OFF" -DPYTHON_VERSION:STRING=${TRAVIS_PYTHON_VERSION} $girder_path
# Get sample database files and install them.
- make -j 3
# Load postgres and show that we loaded the database properly
- gunzip -c data/plugins/database_assetstore/testdb.sql.gz | psql -U postgres sampledb
- psql -U postgres -h 127.0.0.1 sampledb -c "SELECT table_type,table_name FROM information_schema.tables WHERE table_schema='public' order by table_name;" | cat
# Make sure we have a row with a null value
- psql -U postgres -h 127.0.0.1 sampledb -c "update towns set fourcolor=NULL where town='ABINGTON';" | cat
# Load mongo and show that we loaded the database properly
- bunzip2 -c data/plugins/database_assetstore/mongodb.permits.json.bz2 | mongoimport --db boston --collection permits
- mongo boston --eval 'db.permits.count()'
# Only some functions are available in the version that Travis has.
# - psql -U postgres -h 127.0.0.1 sampledb -c "SELECT lower(proname), provolatile FROM pg_proc order by lower(proname);" | cat
- JASMINE_TIMEOUT=15000 ctest -VV
after_success:
- bash <(curl -s https://codecov.io/bash) -R $main_path -s $girder_path