Skip to content

Commit

Permalink
Add qgis-plugin-ci to Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry authored Mar 3, 2020
1 parent 50a2f88 commit 2323ae4
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .qgis-plugin-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugin_path: lizmap
github_organization_slug: 3liz
project_slug: lizmap-plugin
64 changes: 43 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,55 @@
services:
- docker
dist: bionic

sudo: false
language: python

env:
global:
- IMAGE=qgis/qgis
python: 3.7

matrix:
- QGIS_VERSION_TAG=release-3_4
# - QGIS_VERSION_TAG=release-3_10
# - QGIS_VERSION_TAG=latest
services:
- docker

branches:
only:
- master
- dev

before_install:
- docker pull ${IMAGE}:${QGIS_VERSION_TAG}
jobs:
include:
- stage: Run tests
name: QGIS Desktop 3.4

before_install:
- docker pull qgis/qgis:release-3_4

install:
- docker run -d --name qgis-testing-environment -v ${TRAVIS_BUILD_DIR}/lizmap:/lizmap -e DISPLAY=:99 qgis/qgis:release-3_4
- sleep 10
- docker exec -it qgis-testing-environment sh -c "qgis_setup.sh lizmap"

script:
- docker exec -it qgis-testing-environment sh -c "qgis_testrunner.sh lizmap.qgis_plugin_tools.infrastructure.test_runner.test_package"

- stage: Deploy
if: branch = master
on:
tags=true
name: Create release, plugins.qgis.org

install:
- pip3 install qgis-plugin-ci

before_deploy:
- export RELEASE_TITLE="Release of $TRAVIS_TAG"

script:
- qgis-plugin-ci -v

install:
- docker run -d --name qgis-testing-environment -v ${TRAVIS_BUILD_DIR}/lizmap:/lizmap -e DISPLAY=:99 ${IMAGE}:${QGIS_VERSION_TAG}
- sleep 10
- docker exec -it qgis-testing-environment sh -c "qgis_setup.sh lizmap"
deploy:

script:
- docker exec -it qgis-testing-environment sh -c "qgis_testrunner.sh lizmap.qgis_plugin_tools.infrastructure.test_runner.test_package"
- provider: releases
edge: true
file: .
name: ${RELEASE_TITLE}
api_key: ${GH_TOKEN}

notifications:
email:
- etrimaille@3liz.com
- provider: script
script: qgis-plugin-ci release ${TRAVIS_TAG} --github-token ${GH_TOKEN} --osgeo-username ${OSGEO_USERNAME} --osgeo-password {OSGEO_PASSWORD} --create-plugin-repo
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
# Edit the following to match your sources lists
#################################################

VERSION = "3.2.7"

#Add iso code for any locales you want to support here (space separated)
# default is no locales
# Empty in Transifex for now 20/09/2019 : bg_BG zh_CN lt_LT tr
Expand Down Expand Up @@ -214,7 +212,7 @@ docker_test:
$(MAKE) -C lizmap/qgis_plugin_tools docker_test PLUGINNAME=$(PLUGINNAME)

release_%:
$(MAKE) -C lizmap/qgis_plugin_tools release_$* PLUGINNAME=$(PLUGINNAME) VERSION=$(VERSION)
$(MAKE) -C lizmap/qgis_plugin_tools release_$* PLUGINNAME=$(PLUGINNAME)

# i18n_%:
# Do not use qgis_plugin_tools, translation are shared with LWC
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://api.travis-ci.org/3liz/lizmap-plugin.svg?branch=master)](https://travis-ci.org/3liz/lizmap-plugin)

* Latest download link: https://plugins.qgis.org/plugins/lizmap/version/3.2.7/download/
* Latest download link: https://github.com/3liz/lizmap-plugin/releases/latest/download/lizmap.zip
* All versions are available [here](https://plugins.qgis.org/plugins/lizmap/)
* Do not use the link provided by GitHub by default.

Expand Down
2 changes: 1 addition & 1 deletion lizmap/qgis_plugin_tools
2 changes: 1 addition & 1 deletion test/server/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ export QGIS_DISABLE_MESSAGE_HOOKS=1
export QGIS_NO_OVERRIDE_IMPORT=1

pytest -v --qgis-plugins=/src $@

exit $?

0 comments on commit 2323ae4

Please sign in to comment.