forked from osm-fr/osmose-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (50 loc) · 1.57 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
dist: bionic
language: python
python:
- "3.6_with_system_site_packages"
services:
- postgresql
addons:
postgresql: 10
apt:
packages:
- postgresql-10-postgis-2.4
- postgresql-10-postgis-2.4-scripts
# for shp2pgsql
- postgis
# for python3
- python3-pytest
# for osm pbf parser
- g++
- libboost-python-dev
- libosmpbf-dev
- libprotobuf-dev
- make
- pkg-config
- protobuf-compiler
install:
- pip install -r requirements.txt -r requirements-dev.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 ../../
env:
- TEST_SUITE=sax
- TEST_SUITE=merge
- TEST_SUITE=other
jobs:
allow_failures:
- env: TEST_SUITE=merge
script:
- ./tools/pytest.sh $TEST_SUITE