forked from OpenHistoricalDataMap/MapnikTileServer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
56 lines (48 loc) · 1.76 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
dist: bionic
language: python
os:
- linux
services:
- docker
cache:
pip: true
directories:
- $HOME/.cache/pip
addons:
apt:
packages:
- python3-pip
- python3-setuptools
before_script:
# download openstreetmap-carto
- git clone https://github.com/linuxluigi/openstreetmap-carto.git ../openstreetmap-carto
# build docker images production
- cp -r .envs/.local/ .envs/.production/
- sudo docker-compose -f production.yml build
# build docker images
- sudo docker-compose -f local.yml build
# download shape files
- sudo docker-compose -f local.yml run --rm django /get-shapefiles.sh
# generate style.xml
- sudo docker-compose -f local.yml run --rm django python manage.py create_style_xml
# load demo data
- sudo docker-compose -f local.yml run --rm django python manage.py migrate
- sudo docker-compose -f local.yml run --rm django python manage.py import_osm --planet /niue-latest.osm.pbf
# start postgis, redis & celery
- sudo docker-compose -f local.yml up -d postgres celerybeat celeryworker
install:
# install docker-compose
- pip3 install docker-compose wheel
script:
# run typing check with mypy
- sudo docker-compose -f local.yml run django coverage run -m mypy /app
# run pytest
- sudo docker-compose -f local.yml run django coverage run -m pytest
# test clear up cache
- sudo docker-compose -f local.yml run --rm django python manage.py clear_cache
# build docs
- sudo docker-compose -f local.yml run --rm django make --directory docs html
# code coverage upload to codacy
- printf "\nCODACY_PROJECT_TOKEN=$CODACY_PROJECT_TOKEN" >> .envs/.local/.django
- sudo docker-compose -f local.yml run django coverage xml
- sudo docker-compose -f local.yml run django python-codacy-coverage -r coverage.xml