From 0c12388f8804c79a89b63ab54f7e0562293bf509 Mon Sep 17 00:00:00 2001 From: amercader Date: Mon, 28 Oct 2024 11:00:56 +0100 Subject: [PATCH 1/2] Use Python images in tests Rather than the deprecated Alpine ones, as they cause failures like https://github.com/ckan/ckanext-scheming/actions/runs/11551377696/job/32148273098?pr=425 --- .github/workflows/test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f87559f..3018b634 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,13 +17,19 @@ jobs: needs: lint strategy: matrix: - ckan-version: ["2.11", "2.10", "2.9"] + include: + - ckan-version: "2.11" + ckan-image: "ckan/ckan-dev:2.11-py3.10" + - ckan-version: "2.10" + ckan-image: "ckan/ckan-dev:2.10-py3.10" + - ckan-version: "2.9" + ckan-image: "ckan/ckan-dev:2.9-py3.9" fail-fast: false name: CKAN ${{ matrix.ckan-version }} runs-on: ubuntu-latest container: - image: ckan/ckan-dev:${{ matrix.ckan-version }} + image: ${{ matrix.ckan-image }} services: solr: image: ckan/ckan-solr:${{ matrix.ckan-version }}-solr9 From eb4535fd373a9ea6cc81745da8d790a7b7ae0141 Mon Sep 17 00:00:00 2001 From: amercader Date: Mon, 28 Oct 2024 11:06:50 +0100 Subject: [PATCH 2/2] upgrade pytest plugin to avoid exception on 2.9 --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3018b634..3aac838e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,6 +61,10 @@ jobs: run: | pip install -r test-requirements.txt ckan -c test.ini db init + - name: Install requirements (2.9) + run: | + pip install -U pytest-rerunfailures + if: ${{ matrix.ckan-version == '2.9' }} - name: Run all tests run: pytest --ckan-ini=test.ini --cov=ckanext.scheming ckanext/scheming/tests - name: Run plugin subclassing tests