2024 05 datamodel #20
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: 🪲 Plugin | Tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- datamodel/** | |
- plugin/** | |
- '.github/workflows/plugin-test.yml' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- datamodel/** | |
- plugin/** | |
- '.github/workflows/plugin-test.yml' | |
workflow_dispatch: | |
jobs: | |
plugin-tests: | |
name: Run unit tests on plugin | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
qgis_version: [3.34-jammy, latest] | |
env: | |
QGIS_TEST_VERSION: ${{ matrix.qgis_version }} | |
COMPOSE_PROFILES: qgis | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup env | |
run: cp .env.example .env | |
- name: Package PyPI Packages | |
run: sudo ./plugin/scripts/package-pip-packages.sh | |
- name: Download Interlis libs | |
run: sudo ./plugin/scripts/download-interlis-libs.sh | |
- name: Docker build | |
run: docker compose --profile qgis up -d --build | |
- name: Test on QGIS | |
run: docker-compose run qgis /usr/src/plugin/.docker/run-docker-tests.sh | |
- name: Test command line import orgs | |
run: docker-compose run qgis sh -c 'xvfb-run /usr/src/plugin/tdh_cmd.py interlis_import --xtf_file /usr/src/plugin/teksi_district_heating/tests/data/minimal-dataset-organisation-arbon-only.xtf --pghost db --pgdatabase tdh --pguser postgres --pgpass postgres --pgport 5432' | |
- name: Test command line import minimal sia405 Distance heating | |
run: docker-compose run qgis sh -c 'xvfb-run /usr/src/plugin/tdh_cmd.py interlis_import --xtf_file /usr/src/plugin/teksi_district_heating/tests/data/minimal-dataset-SIA405-FERNWAERME.xtf --pghost db --pgdatabase tdh --pguser postgres --pgpass postgres --pgport 5432' | |
- name: Test command line minimal export | |
run: docker-compose run qgis sh -c 'xvfb-run /usr/src/plugin/tdh_cmd.py interlis_export --xtf_file "output.xtf" --pghost db --pgdatabase tdh --pguser postgres --pgpass postgres --pgport 5432' | |
- name: docker logs | |
#if: failure() | |
run: docker compose logs db |