Skip to content

Fix AttributeError when running on older Qt versions #720

Fix AttributeError when running on older Qt versions

Fix AttributeError when running on older Qt versions #720

Workflow file for this run

name: Testing
on:
workflow_call:
push:
paths:
- "koordinates/**"
- ".github/workflows/testing.yaml"
pull_request:
types: [opened, synchronize, edited]
env:
# plugin name/directory where the code for the plugin is stored
PLUGIN_NAME: koordinates
# python notation to test running inside plugin
TESTS_RUN_FUNCTION: koordinates.test_suite.test_package
# Docker settings
DOCKER_IMAGE: qgis/qgis
jobs:
Test-plugin-koordinates:
runs-on: ubuntu-latest
strategy:
matrix:
docker_tags: [release-3_22, release-3_28, release-3_30, latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker pull and create qgis-testing-environment
run: |
docker pull "$DOCKER_IMAGE":${{ matrix.docker_tags }}
docker run -d --name qgis-testing-environment -v "$GITHUB_WORKSPACE":/tests_directory -e DISPLAY=:99 "$DOCKER_IMAGE":${{ matrix.docker_tags }}
- name: Docker set up QGIS
run: |
docker exec qgis-testing-environment sh -c "qgis_setup.sh $PLUGIN_NAME"
docker exec qgis-testing-environment sh -c "rm -f /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/$PLUGIN_NAME"
docker exec qgis-testing-environment sh -c "ln -s /tests_directory/$PLUGIN_NAME /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/$PLUGIN_NAME"
docker exec qgis-testing-environment sh -c "pip3 install -r /tests_directory/requirements_test.txt"
- name: Docker run plugin test
run: |
docker exec qgis-testing-environment sh -c "qgis_testrunner.sh $TESTS_RUN_FUNCTION"