Unit tests for SDG 15.3.1 tools #260
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
# Runs tests on QGIS 3.16, 3.22 LTR, 3.26 and master branch | |
name: Continous Integration | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- main | |
env: | |
# Global environment variable | |
IMAGE: qgis/qgis | |
WITH_PYTHON_PEP: "true" | |
MUTE_LOGS: "true" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Running tests on QGIS ${{ matrix.qgis_version_tag }} | |
strategy: | |
fail-fast: false | |
matrix: | |
qgis_version_tag: | |
- release-3_22 | |
- release-3_26 | |
- latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Preparing docker compose environment | |
env: | |
QGIS_VERSION_TAG: ${{ matrix.qgis_version_tag }} | |
run: | | |
cat << EOF > .env | |
QGIS_VERSION_TAG=${QGIS_VERSION_TAG} | |
IMAGE=${IMAGE} | |
ON_TRAVIS=true | |
MUTE_LOGS=${MUTE_LOGS} | |
WITH_PYTHON_PEP=${WITH_PYTHON_PEP} | |
EOF | |
- name: Preparing test environment | |
run: | | |
cat .env | |
docker pull "${IMAGE}":${{ matrix.qgis_version_tag }} | |
docker compose up -d | |
sleep 10 | |
- name: Run test suite | |
run: | | |
docker compose exec -T qgis-testing-environment sh -c "apt-get update" | |
docker-compose exec -T qgis-testing-environment sh -c "apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev" | |
docker compose exec -T qgis-testing-environment qgis_testrunner.sh test_suite.test_package |