Skip to content

Commit

Permalink
run tests using pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCaha committed Dec 2, 2023
1 parent 1db9713 commit 82a5a17
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/test_plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
TESTS_RUN_FUNCTION: processing_r.test_suite.test_package
# Docker settings
DOCKER_IMAGE: qgis/qgis
PYTHON_SETUP: "PYTHONPATH=/usr/share/qgis/python/:/usr/share/qgis/python/plugins:/usr/lib/python3/dist-packages/qgis:/usr/share/qgis/python/qgis:/tests_directory"


jobs:
Expand All @@ -25,7 +26,7 @@ jobs:

strategy:
matrix:
docker_tags: [release-3_28, release-3_30, release-3_34, latest]
docker_tags: [release-3_16, release-3_28, release-3_30, release-3_32, release-3_34, latest]

steps:

Expand All @@ -39,14 +40,10 @@ jobs:
- 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_TESTING.txt"
docker exec qgis-testing-environment sh -c "apt-get update"
docker exec qgis-testing-environment sh -c "apt-get install -y r-base"
- name: Docker run plugin tests
run: |
docker exec qgis-testing-environment sh -c "qgis_testrunner.sh $TESTS_RUN_FUNCTION"
docker exec qgis-testing-environment sh -c "$PYTHON_SETUP && cd tests_directory && pytest tests --cov=processing_r --cov-report=term-missing:skip-covered -rP -vv -s"

0 comments on commit 82a5a17

Please sign in to comment.