-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
30 lines (25 loc) · 1.11 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
services:
- docker
branches:
only:
- master
env:
global:
- SCRIPT_DIR=script_tools
matrix:
# Run with two version of QGIS
- QGIS_VERSION_TAG=release PYTHON_EXECUTABLE=python PIP_EXECUTABLE=pip
- QGIS_VERSION_TAG=master_2 PYTHON_EXECUTABLE=python PIP_EXECUTABLE=pip
before_install:
- docker pull boundlessgeo/qgis-testing-environment:${QGIS_VERSION_TAG}
- docker tag boundlessgeo/qgis-testing-environment:${QGIS_VERSION_TAG} qgis-testing-environment
install:
# Mount the directory where your tests live into a volumen accessible by the container
- docker run -d --name qgis-testing-environment -v ${TRAVIS_BUILD_DIR}:/tests_directory -e DISPLAY=:99 qgis-testing-environment
- sleep 10
# Set up QGIS for automated testing
- docker exec -it qgis-testing-environment sh -c "qgis_setup.sh ${SCRIPT_DIR}"
- docker exec -it qgis-testing-environment sh -c "cd tests_directory/${SCRIPT_DIR}; ls"
script:
# Run test script using qgis_testrunner.sh
- docker exec -it qgis-testing-environment sh -c "qgis_testrunner.sh ${SCRIPT_DIR}.tests.test_script.run_tests;"