Initial test infrastructure with sample test #25
Workflow file for this run
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
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: docker test | |
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 /usr/src/requirements.txt || pip3 install -r /usr/src/requirements.txt --break-system-packages;xvfb-run pytest' |