Skip to content

change to dynamically loaded ui files #115

change to dynamically loaded ui files

change to dynamically loaded ui files #115

Workflow file for this run

name: Test plugin - QGIS v4.x releases
on:
push:
branches:
- master
paths-ignore:
- '*.md'
- '*.sh'
- '**/metadata.txt'
workflow_dispatch:
pull_request:
branches:
- master
env:
PLUGIN_PATH: valhalla
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# test
# - v4 current release
# - in future: + LTR
qgis_tags: [4.0.1]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: tests
run: |
docker pull qgis/qgis:${{ matrix.qgis_tags }}
docker run -dt --name qgis-testing-environment --network host -v "${GITHUB_WORKSPACE}":/tests_directory -e QT_QPA_PLATFORM="offscreen" qgis/qgis:${{ matrix.qgis_tags }}
# first run the docker/external valhalla_service tests
docker run -dt --name valhalla-router -p 8002:8002 -v $PWD/tests/data:/custom_files -e tileset_name=andorra-tiles ghcr.io/valhalla/valhalla-scripted:latest
sudo apt-get update && sudo apt-get install -y moreutils
jq '.service_limits.status.allow_verbose = true' $PWD/tests/data/valhalla.json | sponge $PWD/tests/data/valhalla.json
docker restart valhalla-router
docker exec qgis-testing-environment bash -c "/tests_directory/tests/scripts/qgis_test_setup.sh ${{ matrix.qgis_tags }} ${{ env.PLUGIN_PATH }} tests/test_localhost_docker"
# then with the plugin enabled and no external valhalla_service
# the test setup will install the bindings to the right location
docker stop valhalla-router
docker exec qgis-testing-environment bash -c "/tests_directory/tests/scripts/qgis_test_setup.sh ${{ matrix.qgis_tags }} ${{ env.PLUGIN_PATH }} tests/test_localhost_plugin"
# do the coverage
docker exec qgis-testing-environment bash -c "cd /tests_directory && python3 -m coverage report && python3 -m coverage lcov --include \"valhalla/*\""
- name: Upload coverage artifact
if: matrix.qgis_tags == '4.0.1'
uses: actions/upload-artifact@v4
with:
name: coverage-lcov
path: coverage.lcov
coveralls:
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download coverage artifact
uses: actions/download-artifact@v4
with:
name: coverage-lcov
- name: Send coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov