From 9a4f715c6c1b3344e2ab00192ceef930c977a335 Mon Sep 17 00:00:00 2001 From: Robert Coup Date: Mon, 15 May 2023 23:46:38 +0100 Subject: [PATCH 1/2] Update kart requirement to v0.12.3 - ci: make kart version more dynamic - ci: use ubuntu-latest for qgis testing - ci: test kart works during qgis testing container build - ci: improvements to docker invocation for qgis testing --- .docker/Dockerfile | 10 ++++++---- .docker/docker-compose.gh.yml | 1 + .github/workflows/testing.yml | 7 ++++--- kart/kartapi.py | 3 ++- kart/tests/test_kartapi.py | 5 +++-- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 67a7404..9634e94 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,5 +1,5 @@ ARG QGIS_TEST_VERSION=latest -FROM qgis/qgis:${QGIS_TEST_VERSION} +FROM qgis/qgis:${QGIS_TEST_VERSION} RUN apt-get update && \ apt-get install -y python3-pip @@ -9,9 +9,11 @@ RUN pip3 install -r /tmp/requirements.txt COPY ./requirements_test.txt /tmp/ RUN pip3 install -r /tmp/requirements_test.txt -RUN apt-get install wget -RUN wget -nv https://github.com/koordinates/kart/releases/download/v0.12.2/kart_0.12.2_amd64.deb -RUN apt install -qy ./kart_0.12.2_amd64.deb +ARG KART_VERSION +RUN apt-get install -y wget +RUN wget -nv https://github.com/koordinates/kart/releases/download/v${KART_VERSION}/kart_${KART_VERSION}_$(dpkg --print-architecture).deb +RUN apt install -qy ./kart_${KART_VERSION}_$(dpkg --print-architecture).deb +#RUN kart --version ENV LANG=C.UTF-8 diff --git a/.docker/docker-compose.gh.yml b/.docker/docker-compose.gh.yml index a223ee6..0d8ce8e 100644 --- a/.docker/docker-compose.gh.yml +++ b/.docker/docker-compose.gh.yml @@ -6,6 +6,7 @@ services: dockerfile: ./.docker/Dockerfile args: QGIS_TEST_VERSION: ${QGIS_TEST_VERSION} + KART_VERSION: ${KART_VERSION} tty: true volumes: - ${GITHUB_WORKSPACE}:/usr/src diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 57219a4..43d982e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ on: jobs: # Run unit tests test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: @@ -21,6 +21,7 @@ jobs: env: QGIS_TEST_VERSION: ${{ matrix.qgis_version }} + KART_VERSION: "0.12.3" steps: - name: Checkout @@ -28,5 +29,5 @@ jobs: - name: Test on QGIS run: > - docker-compose -f .docker/docker-compose.gh.yml - run qgis /usr/src/.docker/run-docker-tests.sh + docker-compose -f .docker/docker-compose.gh.yml run --build --rm + qgis /usr/src/.docker/run-docker-tests.sh diff --git a/kart/kartapi.py b/kart/kartapi.py index 6f29570..4672d8c 100644 --- a/kart/kartapi.py +++ b/kart/kartapi.py @@ -39,7 +39,8 @@ from kart.utils import progressBar, setting, setSetting, KARTPATH, HELPERMODE from kart import logging -SUPPORTED_VERSION = "0.12.2" + +SUPPORTED_VERSION = "0.12.3" class KartException(Exception): diff --git a/kart/tests/test_kartapi.py b/kart/tests/test_kartapi.py index c96025e..241e0c8 100644 --- a/kart/tests/test_kartapi.py +++ b/kart/tests/test_kartapi.py @@ -1,6 +1,7 @@ import os -import tempfile +import re import shutil +import tempfile from qgis.core import ( edit, @@ -79,7 +80,7 @@ def testChangeHelperMode(self): def testKartVersion(self): version = installedVersion() - assert version == "0.12.2" + assert re.match(r'\d+\.\d+\.\d+', version) def testStoreReposInSettings(self): manager = RepoManager() From 12d7107bdb9ceb1ba97e5b5b970d93a5e7c94d7f Mon Sep 17 00:00:00 2001 From: Robert Coup Date: Mon, 15 May 2023 23:48:22 +0100 Subject: [PATCH 2/2] ci: update qgis test versions to v3.28 + latest 3.28 is the current LTR. --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 43d982e..ebcc41b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - qgis_version: [release-3_16, latest] + qgis_version: [release-3_28, latest] fail-fast: false env: