-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (49 loc) · 2.4 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
sudo: required
addons:
ssh_known_hosts: qgis-dev.boundlessgeo.com
hosts:
- boundless-test
services:
- docker
env:
global:
# The plugin basename (the name of the main folder that contains the plugin source code)
- PLUGIN_NAME=printtemplatescreator
# If the build needs docker compose:
#- DOCKER_VERSION=1.12.0-0~trusty
#- DOCKER_COMPOSE_VERSION=1.7.1
matrix:
- QGIS_VERSION_TAG=release
- QGIS_VERSION_TAG=master_2
- QGIS_VERSION_TAG=master
matrix:
allow_failures:
# Do not fail the entire build if it fails only on master
- env: QGIS_VERSION_TAG=master
before_install:
- docker pull boundlessgeo/qgis-testing-environment:${QGIS_VERSION_TAG}
- docker tag boundlessgeo/qgis-testing-environment:${QGIS_VERSION_TAG} qgis-testing-environment
install:
# If the build needs docker compose:
#- apt-cache madison docker-engine
#- sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=${DOCKER_VERSION}
#- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
#- chmod +x docker-compose
#- sudo mv docker-compose /usr/local/bin
#- docker-compose up -d
#- docker-compose ps
# Standard docker (no-compose):
- docker run -d --name qgis-testing-environment -v ${TRAVIS_BUILD_DIR}:/tests_directory -e DISPLAY=:99 qgis-testing-environment
- sleep 10
# Setup QGIS to avoid modals and install test auth db
- docker exec -it qgis-testing-environment sh -c "qgis_setup.sh ${PLUGIN_NAME}"
# Build the plugin
# Any additional build step should go here (or just after the next line)
- docker exec -it qgis-testing-environment sh -c "pip install paver"
- docker exec -it qgis-testing-environment sh -c "cd /tests_directory tests_directory && paver setup && paver package --teststests_directory && paver setup paver setup tests_directory && paver setuptests_directory && paver setup paver package --tests"
- docker exec -it qgis-testing-environment sh -c "ln -s /tests_directory/${PLUGIN_NAME} /root/.qgis2/python/plugins/${PLUGIN_NAME}"
script:
# Run the unit tests
# This plugin has not yet any unit tests
- docker exec -it qgis-testing-environment sh -c "echo '${PLUGIN_NAME} has no unit tests yet, please create them and add here'"
# Note: see any other active plugin for slack and automatic deployment configuration