forked from osm-fr/osmose-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (49 loc) · 1.75 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
dist: xenial
language: python
python:
- "2.7_with_system_site_packages"
- "3.5_with_system_site_packages"
services:
- postgresql
addons:
postgresql: 10
apt:
packages:
- postgresql-10-postgis-2.4
- postgresql-10-postgis-2.4-scripts
# for python2
- python-imposm-parser
# for python3
- python3-nose
# for osm pbf parser
- g++
- libboost-python-dev
- libosmpbf-dev
- libprotobuf-dev
- make
- pkg-config
- protobuf-compiler
before_install:
# from https://github.com/travis-ci/travis-ci/issues/9624
- sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf
- sudo service postgresql restart
- sleep 1
install:
- pip install -r requirements.txt -r requirements-dev.txt -r requirements-dev-python3.txt
before_script:
# configure database
- psql -c 'CREATE USER osmose;' -U postgres
- psql -c "ALTER USER osmose WITH PASSWORD '-osmose-';" -U postgres
- psql -c 'CREATE DATABASE osmose_test;' -U postgres
- psql -c 'GRANT ALL ON database osmose_test TO osmose;' -U postgres
- psql -c 'CREATE EXTENSION hstore; CREATE EXTENSION fuzzystrmatch; CREATE EXTENSION unaccent; CREATE EXTENSION postgis;' -U postgres osmose_test
- psql -c "GRANT SELECT,UPDATE,DELETE ON TABLE spatial_ref_sys TO osmose;" -U postgres osmose_test
- psql -c "GRANT SELECT,UPDATE,DELETE,INSERT ON TABLE geometry_columns TO osmose;" -U postgres osmose_test
- echo "localhost:*:osmose_test:osmose:-osmose-" >> ~/.pgpass
# configure paths used for tmp files
- sudo mkdir -p /data/work/$USER /data/work/$USER/cache
- sudo chown $USER /data/work/$USER /data/work/$USER/cache
# compile osm pbf parser
- cd modules/osm_pbf_parser && make && cd ../../
script:
- ./tools/pynose.sh