Skip to content

Initial test infrastructure with sample test #30

Initial test infrastructure with sample test

Initial test infrastructure with sample test #30

Workflow file for this run

name: Run Tests
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
env:
QGIS_TEST_VERSION: latest
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
qgis_version: [ latest,3.34.14-noble,final-3_28_15 ] # QGIS 3.28, 3.34.x and latest
env:
QGIS_TEST_VERSION: ${{ matrix.qgis_version }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Unit tests
run: >- # The pip install instruction was only added to support QGIS 3.28.x. It can be removed when removing that QGIS version.
docker run
-e PYTHONPATH=/usr/share/qgis/python/plugins
-v $(pwd):/usr/src
-w /usr/src qgis/qgis:${QGIS_TEST_VERSION}
sh -c 'pip3 install -r requirements.txt || pip3 install -r requirements.txt --break-system-packages;xvfb-run pytest'