forked from inasafe/inasafe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
80 lines (64 loc) · 2.31 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
services:
- docker
env:
global:
- ON_TRAVIS=true
- MUTE_LOGS=true
- WITH_PYTHON_PEP=true
- IMAGE=qgis/qgis
matrix:
- QGIS_VERSION_TAG=latest
- QGIS_VERSION_TAG=release-3_4
language: python
cache:
directories:
- $HOME/.cache/pip
python:
- "3.6"
branches:
only:
- master
- develop
- experimental
addons:
apt:
packages:
- git
- python-software-properties
before_install:
- docker pull ${IMAGE}:${QGIS_VERSION_TAG}
install:
- pip install --upgrade pip
- pip install --upgrade pep257
- pip install --upgrade flake8
- docker run -d --name qgis-testing-environment -v ${TRAVIS_BUILD_DIR}:/tests_directory -e WITH_PYTHON_PEP=${WITH_PYTHON_PEP} -e INASAFE_LOGGING_LEVEL=50 -e INASAFE_DISABLE_WELCOME_MESSAGE=1 -e ON_TRAVIS=${ON_TRAVIS} -e MUTE_LOGS=${MUTE_LOGS} -e DISPLAY=:99 ${IMAGE}:${QGIS_VERSION_TAG}
- sleep 10
- docker exec -it qgis-testing-environment sh -c "qgis_setup.sh inasafe"
# FIX default installation because the sources must be in "inasafe" parent folder
- docker exec -it qgis-testing-environment sh -c "rm -f /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/inasafe"
- docker exec -it qgis-testing-environment sh -c "ln -s /tests_directory/ /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/inasafe"
- docker exec -it qgis-testing-environment sh -c "pip3 install -r /tests_directory/REQUIREMENTS.txt"
- docker exec -it qgis-testing-environment sh -c "pip3 install -r /tests_directory/REQUIREMENTS_TESTING.txt"
script:
# The real test
- docker exec -it qgis-testing-environment sh -c "qgis_testrunner.sh test_suite.test_package"
- make pep257
- make flake8
notifications:
irc:
channels:
- "irc.freenode.org#inasafe"
use_notice: true
webhooks:
urls:
- https://webhooks.gitter.im/e/a021ad05fffeac7b0a92L
- https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MHRpbWxpbnV4JTNBbWF0cml4Lm9yZy8lMjFvUHVERUVxZU5vclJxV3hLWWQlM0FtYXRyaXgub3Jn
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always
email:
sudo: false