-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: '3' | ||
services: | ||
qgis: | ||
image: opengisch/qgis:${QGIS_TEST_VERSION} | ||
tty: true | ||
volumes: | ||
- ${GITHUB_WORKSPACE}:/usr/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
#*************************************************************************** | ||
# ------------------- | ||
# begin : 2017-08-24 | ||
# git sha : :%H$ | ||
# copyright : (C) 2017 by OPENGIS.ch | ||
# email : [email protected] | ||
#*************************************************************************** | ||
# | ||
#*************************************************************************** | ||
#* * | ||
#* This program is free software; you can redistribute it and/or modify * | ||
#* it under the terms of the GNU General Public License as published by * | ||
#* the Free Software Foundation; either version 2 of the License, or * | ||
#* (at your option) any later version. * | ||
#* * | ||
#*************************************************************************** | ||
|
||
set -e | ||
|
||
pushd /usr/src | ||
DEFAULT_PARAMS='-v' | ||
xvfb-run pytest-3 ${@:-`echo $DEFAULT_PARAMS`} | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run tests | ||
run: | | ||
docker run -v ${GITHUB_WORKSPACE}:/src -w /src opengisch/qgis:stable sh -c 'xvfb-run pytest-3' | ||
env: | ||
DOCKER_IMAGE: ${{ steps.docker-build.outputs.FULL_IMAGE_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Arguments are passed one to one to pytest | ||
# | ||
# Run all tests: | ||
# ./scripts/run-tests.sh # Run all tests | ||
# | ||
# Run all test starting with test_array_ | ||
# ./scripts/run-tests.sh -k test_array_ | ||
|
||
if [ -z "$QGIS_TEST_VERSION" ]; then | ||
export QGIS_TEST_VERSION=latest # See https://hub.docker.com/r/qgis/qgis/tags/ | ||
fi | ||
|
||
cd $(dirname $0)/.. | ||
export GITHUB_WORKSPACE=$PWD # only for local execution | ||
|
||
docker-compose -f .docker/docker-compose.gh.yml run qgis /usr/src/.docker/run-docker-tests.sh $@ | ||
docker-compose -f .docker/docker-compose.gh.yml rm -s -f |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from qgis.core import QgsFeature, QgsProject, QgsRelation, QgsVectorLayer | ||
from qgis.gui import QgsAttributeEditorContext | ||
from qgis.PyQt.QtCore import Qt | ||
from qgis.testing import start_app, unittest | ||
|
||
from pzp.calculation import CalculationDialog | ||
|
||
start_app() | ||
|
||
|
||
class TestCalculation(unittest.TestCase): | ||
|
||
def test_Calculation(self): | ||
|
||
self.assertTrue(False) | ||
|