From 8547e5b1cb3a60e1be125ef38747f788f9db7875 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 12:21:44 +0200 Subject: [PATCH 01/24] tests: Add Github Actions tests --- .github/workflows/test.yml | 82 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..3849c1d0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,82 @@ +name: Tests +on: [push, pull_request] +jobs: + lint: + runs-on: ubuntu-latest + container: + image: python:2.7.18-buster + steps: + - uses: actions/checkout@v3 + - name: Install requirements + run: pip install flake8 pycodestyle + - name: Check syntax + run: flake8 --statistics --show-source ckanext + + test: + needs: lint + strategy: + matrix: + ckan-version: [2.8] + fail-fast: false + + name: CKAN ${{ matrix.ckan-version }} + runs-on: ubuntu-latest + container: + image: openknowledge/ckan-dev:${{ matrix.ckan-version }} + services: + solr: + image: ckan/ckan-solr:${{ matrix.ckan-version }} + postgres: + image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }} + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + redis: + image: redis:3 + env: + CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test + CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test + CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgres/datastore_test + CKAN_SOLR_URL: http://solr:8983/solr/ckan + CKAN_REDIS_URL: redis://redis:6379/1 + CKAN_SITE_URL: http://test.ckan.net + + steps: + - uses: actions/checkout@v3 + - name: Install requirements + run: | + # Replace default path to CKAN core config file with the one on the container + sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini + pip install -r requirements.txt + pip install -r dev-requirements.txt + pip install -e . + pip install -e git+https://github.com/ckan/ckanext-scheming.git#egg=ckanext-scheming + pip install -e git+https://github.com/ckan/ckanext-fluent.git#egg=ckanext-fluent + pip install -e git+https://github.com/ckan/ckanext-hierarchy.git#egg=ckanext-hierarchy + # Last commit before support for Python 2 was dropped + pip install -e git+https://github.com/ckan/ckanext-harvest.git@v1.4.2#egg=ckanext-harvest + pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/v1.4.2/requirements.txt + # Last commit before support for Python 2 was dropped + pip install -e git+https://github.com/ckan/ckanext-dcat.git@0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6#egg=ckanext-dcat + pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6/requirements-py2.txt + pip install -e git+https://github.com/opendata-swiss/ckanext-dcatapchharvest.git#egg=ckanext-dcatapchharvest + pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-dcatapchharvest/master/requirements.txt + pip install -e git+https://github.com/opendata-swiss/ckanext-harvester_dashboard.git#egg=ckanext-harvester_dashboard + pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-harvester_dashboard/master/requirements.txt + pip install -e git+https://github.com/ckan/ckanext-xloader.git#egg=ckanext-xloader + pip install -r https://raw.githubusercontent.com/ckan/ckanext-xloader/master/requirements.txt + pip install -e git+https://github.com/opendata-swiss/ckanext-subscribe.git#egg=ckanext-subscribe + pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-subscribe/master/requirements.txt + # Last commit before support for Python 2 was dropped + pip install -e git+https://github.com/ckan/ckanext-showcase.git@v1.5.2#egg=ckanext-showcase + pip install -e git+https://github.com/opendata-swiss/ckanext-switzerland-ng.git#egg=ckanext-switzerland-ng + pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-switzerland-ng/master/requirements.txt + + - name: Setup extension + run: | + paster --plugin=ckan db init -c test.ini + paster --plugin=ckanext-harvest harvester initdb -c test.ini + - name: Run tests + run: nosetests --ckan --nocapture --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.geocat --cover-inclusive --cover-erase --cover-tests ckanext/geocat From d00e056c93103ef5f9fc0715c8ecb4bcd989383e Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 12:24:43 +0200 Subject: [PATCH 02/24] style: Fix flake8 errors --- ckanext/geocat/utils/xpath_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckanext/geocat/utils/xpath_utils.py b/ckanext/geocat/utils/xpath_utils.py index 2f2fb6ef..33aa07a5 100644 --- a/ckanext/geocat/utils/xpath_utils.py +++ b/ckanext/geocat/utils/xpath_utils.py @@ -173,7 +173,7 @@ def xpath_get_rights_dict_form_rights_node(node): if value_locale: rights_dict[locale.lower()] = _clean_string(value_locale[0]) return rights_dict - except: + except Exception: return '' @@ -376,7 +376,7 @@ def _get_normed_protocol(protocol): def _clean_string(value): try: - return re.sub('\s+', ' ', value).strip() + return re.sub(r'\s+', ' ', value).strip() except TypeError: return value From a6ac8ab43e5858fa9168f0c80c997479c021d23e Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 12:28:43 +0200 Subject: [PATCH 03/24] chore: Revert to pyyaml==5.3.1 due to bug See here for more details: https://github.com/yaml/pyyaml/issues/724 We should revert to 5.4 as soon as possible. --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 383e19b5..93c9bcba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ lxml>=4.6.2 OWSLib==0.18.0 python-dateutil==2.8.1 -pyyaml==5.4 +# TODO: Revert to 5.4 once https://github.com/yaml/pyyaml/issues/724 is fixed +pyyaml==5.3.1 rdflib==5.0.0 From c6f9d5446933610dc4b41722dbf61ba3fb178145 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 12:30:47 +0200 Subject: [PATCH 04/24] tests: Remove old Travis config --- .travis.yml | 22 ------ bin/travis-build.bash | 167 ------------------------------------------ bin/travis-run.sh | 14 ---- 3 files changed, 203 deletions(-) delete mode 100644 .travis.yml delete mode 100644 bin/travis-build.bash delete mode 100755 bin/travis-run.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c959811e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -sudo: required - -# the new trusty images of Travis cause build errors with psycopg2, see https://github.com/travis-ci/travis-ci/issues/8897 -dist: trusty -group: deprecated-2017Q4 - -language: python - -python: -- '2.7' - -env: - - CKANVERSION=2.8 - -services: - - redis-server - - postgresql - -install: - - bash bin/travis-build.bash - -script: bin/travis-run.sh diff --git a/bin/travis-build.bash b/bin/travis-build.bash deleted file mode 100644 index 7adca274..00000000 --- a/bin/travis-build.bash +++ /dev/null @@ -1,167 +0,0 @@ -#!/bin/bash -set -e - -echo "This is travis-build.bash..." - -echo "Updating GPG keys..." -wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - -curl -L https://packagecloud.io/github/git-lfs/gpgkey | sudo apt-key add - -wget -qO - https://www.mongodb.org/static/pgp/server-3.2.asc | sudo apt-key add - - -echo "Adding archive repository for postgres..." -sudo rm /etc/apt/sources.list.d/pgdg* -echo "deb https://apt-archive.postgresql.org/pub/repos/apt trusty-pgdg-archive main" | sudo tee -a /etc/apt/sources.list -echo "deb-src https://apt-archive.postgresql.org/pub/repos/apt trusty-pgdg-archive main" | sudo tee -a /etc/apt/sources.list - -echo "Removing old repository for cassandra..." -sudo rm /etc/apt/sources.list.d/cassandra* - -echo "Installing the packages that CKAN requires..." -sudo apt-get update -qq -sudo apt-get install solr-jetty libcommons-fileupload-java - -echo "Installing CKAN and its Python dependencies..." -git clone https://github.com/ckan/ckan -cd ckan -if [ $CKANVERSION == 'master' ] -then - echo "CKAN version: master" -else - CKAN_TAG=$(git tag | grep ^ckan-$CKANVERSION | sort --version-sort | tail -n 1) - git checkout $CKAN_TAG - echo "CKAN version: ${CKAN_TAG#ckan-}" -fi - -# install the recommended version of setuptools -if [ -f requirement-setuptools.txt ] -then - echo "Updating setuptools..." - pip install -r requirement-setuptools.txt -fi - -python setup.py develop - -pip install -r requirements.txt -pip install -r dev-requirements.txt -cd - - -echo "Setting up Solr..." -printf "NO_START=0\nJETTY_HOST=127.0.0.1\nJETTY_PORT=8983\nJAVA_HOME=$JAVA_HOME" | sudo tee /etc/default/jetty -sudo cp schema.xml /etc/solr/conf/schema.xml -sudo service jetty restart - -echo "Creating the PostgreSQL user and database..." -sudo -u postgres psql -c "CREATE USER ckan_default WITH PASSWORD 'pass';" -sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;' - -echo "Initialising the database..." -cd ckan -paster db init -c test-core.ini -cd - - -echo "Installing ckanext-harvest and its requirements..." -git clone --depth 1 --branch v1.4.2 https://github.com/ckan/ckanext-harvest -cd ckanext-harvest -python setup.py develop -pip install -r pip-requirements.txt -paster harvester initdb -c ../ckan/test-core.ini -cd - - -# Begin installation of ckanext-switzerland-ng and its requirements. -# This is necessary so that the geocat harvester can save datasets using the -# correct schema, defined in ckanext.switzerland:dcat-ap-switzerland_scheming.json. -# We have to install the whole ckanext, as the schema relies on custom -# validators. Hopefully we can untangle this later to avoid all this installing. - -# The version of setuptools in CKAN (36.1) falls over when installing -# dependencies for ckanext-scheming on Travis, specifically ckantoolkit. -# A newer setuptools version works, possibly because in versions >42, -# pip is used to install dependencies listed in install_requires in -# setup.py. -echo "Upgrading setuptools..." -pip install --upgrade setuptools - -echo "Installing ckanext-scheming and its requirements..." -git clone https://github.com/opendata-swiss/ckanext-scheming.git -cd ckanext-scheming -git checkout repair-pyyaml-dependency -python setup.py develop -cd - - -echo "Installing ckanext-fluent and its requirements..." -git clone https://github.com/ckan/ckanext-fluent -cd ckanext-fluent -python setup.py develop -cd - - -echo "Installing ckanext-hierarchy and its requirements..." -git clone https://github.com/opendata-swiss/ckanext-hierarchy -cd ckanext-hierarchy -python setup.py develop -cd - - -echo "Installing ckanext-dcat and its requirements..." -git clone https://github.com/ckan/ckanext-dcat -cd ckanext-dcat -# Last commit before support for Python 2 was dropped -git checkout 0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6 -python setup.py develop -pip install -r requirements-py2-py36.txt -pip install -r dev-requirements-py2.txt -cd - - -echo "Installing ckanext-dcatapchharvest and its requirements..." -git clone https://github.com/opendata-swiss/ckanext-dcatapchharvest -cd ckanext-dcatapchharvest -python setup.py develop -pip install -r requirements.txt -pip install -r dev-requirements.txt -cd - - -echo "Installing ckanext-harvester_dashboard and its requirements..." -git clone https://github.com/opendata-swiss/ckanext-harvester_dashboard -cd ckanext-harvester_dashboard -python setup.py develop -pip install -r requirements.txt -cd - - -echo "Installing ckanext-xloader and its requirements..." -git clone https://github.com/ckan/ckanext-xloader -cd ckanext-xloader -python setup.py develop -pip install -r requirements.txt -cd - - -echo "Installing ckanext-showcase..." -git clone --depth 1 --branch v1.5.2 https://github.com/ckan/ckanext-showcase -cd ckanext-showcase -python setup.py develop -cd - - -echo "Installing ckanext-subscribe and its requirements..." -git clone https://github.com/opendata-swiss/ckanext-subscribe -cd ckanext-subscribe -python setup.py develop -pip install -r requirements.txt -cd - - -echo "Installing ckanext-switzerland and its requirements..." -git clone https://github.com/opendata-swiss/ckanext-switzerland-ng -cd ckanext-switzerland-ng -python setup.py develop -pip install -r requirements.txt -pip install -r dev-requirements.txt -cd - - -# End installation of ckanext-switzlerland et al. - -echo "Installing ckanext-geocat and its requirements..." -pip install -r requirements.txt -pip install -r dev-requirements.txt -python setup.py develop - -echo "Moving test.ini into a subdir..." -mkdir subdir -mv test.ini subdir - -echo "travis-build.bash is done." diff --git a/bin/travis-run.sh b/bin/travis-run.sh deleted file mode 100755 index b03a7e02..00000000 --- a/bin/travis-run.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -e - -function cleanup { - exit $? -} - -trap "cleanup" EXIT - -# Check PEP-8 code style and McCabe complexity -flake8 --statistics --show-source ckanext - -nosetests -v --ckan --nologcapture --with-pylons=subdir/test.ini --with-coverage --cover-package=ckanext.geocat --cover-inclusive --cover-erase --cover-tests ckanext/geocat From 7858a2156c66cd0a956a40b5a87243d73e1bdb1a Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 12:52:50 +0200 Subject: [PATCH 05/24] chore: Pin pyproj version to that used by CKAN --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 93c9bcba..6682209f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ lxml>=4.6.2 OWSLib==0.18.0 +pyproj==1.9.6 python-dateutil==2.8.1 # TODO: Revert to 5.4 once https://github.com/yaml/pyyaml/issues/724 is fixed pyyaml==5.3.1 From b57bf964f3265ad7385056c84c928b99c939912c Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 14:33:07 +0200 Subject: [PATCH 06/24] tests: Output logs in tests Because I can't get them to work locally. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3849c1d0..1beabb31 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,4 +79,4 @@ jobs: paster --plugin=ckan db init -c test.ini paster --plugin=ckanext-harvest harvester initdb -c test.ini - name: Run tests - run: nosetests --ckan --nocapture --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.geocat --cover-inclusive --cover-erase --cover-tests ckanext/geocat + run: nosetests --ckan --with-pylons=test.ini --with-coverage --cover-package=ckanext.geocat --cover-inclusive --cover-erase --cover-tests ckanext/geocat From 2c549cf0a8b44debc6a940b45292f8926c00bc2c Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 14:46:32 +0200 Subject: [PATCH 07/24] feat: Map resource rights to license field as well --- ckanext/geocat/utils/ogdch_map_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ckanext/geocat/utils/ogdch_map_utils.py b/ckanext/geocat/utils/ogdch_map_utils.py index ec5a33a5..969b6454 100644 --- a/ckanext/geocat/utils/ogdch_map_utils.py +++ b/ckanext/geocat/utils/ogdch_map_utils.py @@ -206,6 +206,7 @@ def map_resource(geocat_resource, issued, modified, rights): resource_dict['issued'] = issued resource_dict['modified'] = modified resource_dict['rights'] = rights + resource_dict['license'] = rights if geocat_resource.get('format'): resource_dict['format'] = geocat_resource['format'] resource_dict['description'] = geocat_resource.get('description') From 7ef7eb32587a3ff73f8221b45c37e5cde891b1c2 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 16:15:26 +0200 Subject: [PATCH 08/24] tests: Set up solr container for testing --- .github/workflows/test.yml | 67 ++++++++++++++++---------------- bin/install_test_requirements.sh | 41 +++++++++++++++++++ 2 files changed, 74 insertions(+), 34 deletions(-) create mode 100644 bin/install_test_requirements.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1beabb31..9c1149ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,8 +24,6 @@ jobs: container: image: openknowledge/ckan-dev:${{ matrix.ckan-version }} services: - solr: - image: ckan/ckan-solr:${{ matrix.ckan-version }} postgres: image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }} env: @@ -42,41 +40,42 @@ jobs: CKAN_SOLR_URL: http://solr:8983/solr/ckan CKAN_REDIS_URL: redis://redis:6379/1 CKAN_SITE_URL: http://test.ckan.net + WORKDIR: /__w/ckanext-geocat/ckanext-geocat + SOLR_CONFIG_CKAN_DIR: /opt/solr/server/solr/configsets/ckan/conf steps: - uses: actions/checkout@v3 - - name: Install requirements + - name: Create solr container run: | - # Replace default path to CKAN core config file with the one on the container - sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini - pip install -r requirements.txt - pip install -r dev-requirements.txt - pip install -e . - pip install -e git+https://github.com/ckan/ckanext-scheming.git#egg=ckanext-scheming - pip install -e git+https://github.com/ckan/ckanext-fluent.git#egg=ckanext-fluent - pip install -e git+https://github.com/ckan/ckanext-hierarchy.git#egg=ckanext-hierarchy - # Last commit before support for Python 2 was dropped - pip install -e git+https://github.com/ckan/ckanext-harvest.git@v1.4.2#egg=ckanext-harvest - pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/v1.4.2/requirements.txt - # Last commit before support for Python 2 was dropped - pip install -e git+https://github.com/ckan/ckanext-dcat.git@0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6#egg=ckanext-dcat - pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6/requirements-py2.txt - pip install -e git+https://github.com/opendata-swiss/ckanext-dcatapchharvest.git#egg=ckanext-dcatapchharvest - pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-dcatapchharvest/master/requirements.txt - pip install -e git+https://github.com/opendata-swiss/ckanext-harvester_dashboard.git#egg=ckanext-harvester_dashboard - pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-harvester_dashboard/master/requirements.txt - pip install -e git+https://github.com/ckan/ckanext-xloader.git#egg=ckanext-xloader - pip install -r https://raw.githubusercontent.com/ckan/ckanext-xloader/master/requirements.txt - pip install -e git+https://github.com/opendata-swiss/ckanext-subscribe.git#egg=ckanext-subscribe - pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-subscribe/master/requirements.txt - # Last commit before support for Python 2 was dropped - pip install -e git+https://github.com/ckan/ckanext-showcase.git@v1.5.2#egg=ckanext-showcase - pip install -e git+https://github.com/opendata-swiss/ckanext-switzerland-ng.git#egg=ckanext-switzerland-ng - pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-switzerland-ng/master/requirements.txt - - - name: Setup extension + git clone https://github.com/opendata-swiss/ckanext-switzerland-ng.git + /usr/bin/docker create --name test_solr --network ${{ job.container.network }} --network-alias solr \ + --workdir $WORKDIR --publish 8983:8983 \ + -e "SOLR_HEAP=1024m" -e "SOLR_SCHEMA_FILE=$SOLR_CONFIG_CKAN_DIR/managed-schema" \ + -e GITHUB_ACTIONS=true -e CI=true \ + -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/schema.xml":"$SOLR_CONFIG_CKAN_DIR/managed-schema" \ + -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/english_stop.txt":"$SOLR_CONFIG_CKAN_DIR/english_stop.txt" \ + -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/fr_elision.txt":"$SOLR_CONFIG_CKAN_DIR/fr_elision.txt" \ + -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/french_stop.txt":"$SOLR_CONFIG_CKAN_DIR/french_stop.txt" \ + -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/german_dictionary.txt":"$SOLR_CONFIG_CKAN_DIR/german_dictionary.txt" \ + -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/german_stop.txt":"$SOLR_CONFIG_CKAN_DIR/german_stop.txt" \ + -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/italian_stop.txt":"$SOLR_CONFIG_CKAN_DIR/italian_stop.txt" \ + -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/solrconfig.xml":"$SOLR_CONFIG_CKAN_DIR/solrconfig.xml" \ + ckan/ckan-solr:${{ matrix.ckan-version }} + docker start test_solr + - name: Create ckan container + run: | + /usr/bin/docker create --name test_ckan --network ${{ job.container.network }} --network-alias ckan \ + -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" \ + -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" \ + -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" \ + -v "/home/runner/work/_temp/_github_home":"/github/home" \ + -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" \ + --entrypoint "tail" openknowledge/ckan-dev:${{ matrix.ckan-version }} "-f" "/dev/null" + docker start test_ckan + - name: Install requirements and set up database run: | - paster --plugin=ckan db init -c test.ini - paster --plugin=ckanext-harvest harvester initdb -c test.ini + docker exec test_ckan $WORKDIR/bin/install_test_requirements.sh ${{ matrix.ckan-version }} - name: Run tests - run: nosetests --ckan --with-pylons=test.ini --with-coverage --cover-package=ckanext.geocat --cover-inclusive --cover-erase --cover-tests ckanext/geocat + run: | + docker exec test_ckan nosetests --ckan --nocapture --nologcapture --with-pylons=$WORKDIR/test.ini \ + --with-coverage --cover-package=ckanext.geocat --cover-inclusive --cover-erase --cover-tests $WORKDIR/ckanext/geocat diff --git a/bin/install_test_requirements.sh b/bin/install_test_requirements.sh new file mode 100644 index 00000000..66335525 --- /dev/null +++ b/bin/install_test_requirements.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +pip install -r requirements.txt +pip install -r dev-requirements.txt +pip install -e . + +pip install -e git+https://github.com/ckan/ckanext-scheming.git#egg=ckanext-scheming +pip install -e git+https://github.com/ckan/ckanext-fluent.git#egg=ckanext-fluent +pip install -e git+https://github.com/ckan/ckanext-hierarchy.git#egg=ckanext-hierarchy +pip install -e git+https://github.com/ckan/ckanext-xloader.git#egg=ckanext-xloader +pip install -r https://raw.githubusercontent.com/ckan/ckanext-xloader/master/requirements.txt + +# Last commit before support for Python 2 was dropped +pip install -e git+https://github.com/ckan/ckanext-harvest.git@v1.4.2#egg=ckanext-harvest +pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/v1.4.2/requirements.txt + +# Last commit before support for Python 2 was dropped +pip install -e git+https://github.com/ckan/ckanext-dcat.git@0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6#egg=ckanext-dcat +pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6/requirements-py2.txt + +# Last commit before support for Python 2 was dropped +pip install -e git+https://github.com/ckan/ckanext-showcase.git@v1.5.2#egg=ckanext-showcase + +# Our ckanexts +pip install -e git+https://github.com/opendata-swiss/ckanext-dcatapchharvest.git#egg=ckanext-dcatapchharvest +pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-dcatapchharvest/master/requirements.txt +pip install -e git+https://github.com/opendata-swiss/ckanext-harvester_dashboard.git#egg=ckanext-harvester_dashboard +pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-harvester_dashboard/master/requirements.txt +pip install -e git+https://github.com/opendata-swiss/ckanext-subscribe.git#egg=ckanext-subscribe +pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-subscribe/master/requirements.txt +pip install -e git+https://github.com/opendata-swiss/ckanext-switzerland-ng.git#egg=ckanext-switzerland-ng +pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-switzerland-ng/master/requirements.txt + +# Replace default path to CKAN core config file with the one on the container +sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' "$WORKDIR"/test.ini + +# Init db and enable required plugins +paster --plugin=ckan config-tool "$WORKDIR"/test.ini "ckan.plugins = " +paster --plugin=ckan db init -c "$WORKDIR"/test.ini +paster --plugin=ckanext-harvest harvester initdb -c "$WORKDIR"/test.ini +paster --plugin=ckan config-tool "$WORKDIR"/test.ini "ckan.plugins = harvest ckan_harvester geocat_harvester ogdch ogdch_pkg scheming_datasets fluent" From 4829c101fca8be8fd17840b17fad87ce7f5343dd Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 16:19:37 +0200 Subject: [PATCH 09/24] tests: Don't specify location of docker executable --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c1149ff..28082b9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: - name: Create solr container run: | git clone https://github.com/opendata-swiss/ckanext-switzerland-ng.git - /usr/bin/docker create --name test_solr --network ${{ job.container.network }} --network-alias solr \ + docker create --name test_solr --network ${{ job.container.network }} --network-alias solr \ --workdir $WORKDIR --publish 8983:8983 \ -e "SOLR_HEAP=1024m" -e "SOLR_SCHEMA_FILE=$SOLR_CONFIG_CKAN_DIR/managed-schema" \ -e GITHUB_ACTIONS=true -e CI=true \ @@ -64,7 +64,7 @@ jobs: docker start test_solr - name: Create ckan container run: | - /usr/bin/docker create --name test_ckan --network ${{ job.container.network }} --network-alias ckan \ + docker create --name test_ckan --network ${{ job.container.network }} --network-alias ckan \ -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" \ -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" \ -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" \ From 5c30349b9f122ed7c2131b7c2aee6e3d9cca63dc Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 16:28:57 +0200 Subject: [PATCH 10/24] tests: Don't run in a container --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28082b9f..72de2213 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,8 +21,6 @@ jobs: name: CKAN ${{ matrix.ckan-version }} runs-on: ubuntu-latest - container: - image: openknowledge/ckan-dev:${{ matrix.ckan-version }} services: postgres: image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }} From b0bf5c6e7cd06d6ae87a1660fda1ffaede2ceaa4 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 16:31:16 +0200 Subject: [PATCH 11/24] tests: Make install script executable --- bin/install_test_requirements.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bin/install_test_requirements.sh diff --git a/bin/install_test_requirements.sh b/bin/install_test_requirements.sh old mode 100644 new mode 100755 From f466a36328bdb43773f6b57da23b62befc11913e Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 16:42:15 +0200 Subject: [PATCH 12/24] tests: Use our fork of ckanext-scheming --- bin/install_test_requirements.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install_test_requirements.sh b/bin/install_test_requirements.sh index 66335525..bb3cc69f 100755 --- a/bin/install_test_requirements.sh +++ b/bin/install_test_requirements.sh @@ -4,7 +4,6 @@ pip install -r requirements.txt pip install -r dev-requirements.txt pip install -e . -pip install -e git+https://github.com/ckan/ckanext-scheming.git#egg=ckanext-scheming pip install -e git+https://github.com/ckan/ckanext-fluent.git#egg=ckanext-fluent pip install -e git+https://github.com/ckan/ckanext-hierarchy.git#egg=ckanext-hierarchy pip install -e git+https://github.com/ckan/ckanext-xloader.git#egg=ckanext-xloader @@ -30,6 +29,7 @@ pip install -e git+https://github.com/opendata-swiss/ckanext-subscribe.git#egg=c pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-subscribe/master/requirements.txt pip install -e git+https://github.com/opendata-swiss/ckanext-switzerland-ng.git#egg=ckanext-switzerland-ng pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-switzerland-ng/master/requirements.txt +pip install -e git+https://github.com/opendata-swiss/ckanext-scheming.git#egg=ckanext-scheming # Replace default path to CKAN core config file with the one on the container sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' "$WORKDIR"/test.ini From 93f28f6641287b3ce28351691e458d5b4e204ee5 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 16:49:46 +0200 Subject: [PATCH 13/24] tests: Define variable in script --- bin/install_test_requirements.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/install_test_requirements.sh b/bin/install_test_requirements.sh index bb3cc69f..fc4d97c0 100755 --- a/bin/install_test_requirements.sh +++ b/bin/install_test_requirements.sh @@ -31,6 +31,8 @@ pip install -e git+https://github.com/opendata-swiss/ckanext-switzerland-ng.git# pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-switzerland-ng/master/requirements.txt pip install -e git+https://github.com/opendata-swiss/ckanext-scheming.git#egg=ckanext-scheming +WORKDIR=/__w/ckanext-geocat/ckanext-geocat + # Replace default path to CKAN core config file with the one on the container sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' "$WORKDIR"/test.ini From 18c5b8da788d61788bddffd0cc31cb65f4e043aa Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 16:56:47 +0200 Subject: [PATCH 14/24] tests: Set port for postgres container --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72de2213..adb74bd9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,9 +28,11 @@ jobs: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres + ports: + - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 redis: - image: redis:3 + image: redis:3 env: CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test From faadbda58ac11fd6e14cad83cc10363944a74888 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 17:18:37 +0200 Subject: [PATCH 15/24] tests: Update test.ini for github testing --- test.ini | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test.ini b/test.ini index 25b8af1b..b19793cc 100644 --- a/test.ini +++ b/test.ini @@ -9,13 +9,17 @@ host = 0.0.0.0 port = 5000 [app:main] -# Config for Travis testing +# Config for GitHub testing use = config:../ckan/test-core.ini -solr_url = http://127.0.0.1:8983/solr +solr_url = http://solr:8983/solr/ckan +sqlalchemy.url = postgresql://ckan_default:pass@postgres/ckan_test +ckan.redis.url = redis://redis:6379/1 # Config for local testing (uncomment to use, but don't commit) # use = config:/usr/lib/ckan/venv/src/ckan/test-core.ini # solr_url = http://solr:8983/solr +# sqlalchemy.url = postgresql://ckan:ckan@db/ckan_test +# ckan.redis.url = redis://redis:6379/1 ckan.plugins = harvest ckan_harvester geocat_harvester ogdch ogdch_pkg scheming_datasets fluent From e70ce0b1ebb1123118a92f36a90eb24b0d63b127 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 17:19:30 +0200 Subject: [PATCH 16/24] tests: Update pip before installing requirements --- bin/install_test_requirements.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/install_test_requirements.sh b/bin/install_test_requirements.sh index fc4d97c0..8a5b88cd 100755 --- a/bin/install_test_requirements.sh +++ b/bin/install_test_requirements.sh @@ -1,5 +1,7 @@ #!/bin/bash +pip install --upgrade pip + pip install -r requirements.txt pip install -r dev-requirements.txt pip install -e . From 58c731cc79a2ea1893a22348ae7b7e1442b34097 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 17:26:11 +0200 Subject: [PATCH 17/24] tests: Fix path to ckanext and requirements --- bin/install_test_requirements.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/install_test_requirements.sh b/bin/install_test_requirements.sh index 8a5b88cd..84bc29f8 100755 --- a/bin/install_test_requirements.sh +++ b/bin/install_test_requirements.sh @@ -1,11 +1,15 @@ #!/bin/bash +WORKDIR=/__w/ckanext-geocat/ckanext-geocat + pip install --upgrade pip -pip install -r requirements.txt -pip install -r dev-requirements.txt -pip install -e . +# Install ckanext-geocat +pip install -r "$WORKDIR"/requirements.txt +pip install -r "$WORKDIR"/dev-requirements.txt +pip install -e "$WORKDIR"/ +# Install ckanext dependencies pip install -e git+https://github.com/ckan/ckanext-fluent.git#egg=ckanext-fluent pip install -e git+https://github.com/ckan/ckanext-hierarchy.git#egg=ckanext-hierarchy pip install -e git+https://github.com/ckan/ckanext-xloader.git#egg=ckanext-xloader @@ -33,8 +37,6 @@ pip install -e git+https://github.com/opendata-swiss/ckanext-switzerland-ng.git# pip install -r https://raw.githubusercontent.com/opendata-swiss/ckanext-switzerland-ng/master/requirements.txt pip install -e git+https://github.com/opendata-swiss/ckanext-scheming.git#egg=ckanext-scheming -WORKDIR=/__w/ckanext-geocat/ckanext-geocat - # Replace default path to CKAN core config file with the one on the container sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' "$WORKDIR"/test.ini From 298f92178c38832bba6f8c43bbcade0e3d55c9c0 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 17:36:04 +0200 Subject: [PATCH 18/24] tests: Output logs for debugging --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index adb74bd9..a9a220e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,5 +77,5 @@ jobs: docker exec test_ckan $WORKDIR/bin/install_test_requirements.sh ${{ matrix.ckan-version }} - name: Run tests run: | - docker exec test_ckan nosetests --ckan --nocapture --nologcapture --with-pylons=$WORKDIR/test.ini \ + docker exec test_ckan nosetests --ckan --with-pylons=$WORKDIR/test.ini \ --with-coverage --cover-package=ckanext.geocat --cover-inclusive --cover-erase --cover-tests $WORKDIR/ckanext/geocat From 6afb930f465f2a82b2d60e6348c05cd9d3f5b276 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 17:55:15 +0200 Subject: [PATCH 19/24] tests: Add debug statements --- .github/workflows/test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9a220e6..262f4294 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,6 +48,7 @@ jobs: - name: Create solr container run: | git clone https://github.com/opendata-swiss/ckanext-switzerland-ng.git + ls ${{ github.workspace }}/ckanext-switzerland-ng/solr/schema.xml docker create --name test_solr --network ${{ job.container.network }} --network-alias solr \ --workdir $WORKDIR --publish 8983:8983 \ -e "SOLR_HEAP=1024m" -e "SOLR_SCHEMA_FILE=$SOLR_CONFIG_CKAN_DIR/managed-schema" \ @@ -62,6 +63,13 @@ jobs: -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/solrconfig.xml":"$SOLR_CONFIG_CKAN_DIR/solrconfig.xml" \ ckan/ckan-solr:${{ matrix.ckan-version }} docker start test_solr + docker exec test_solr bash -c "echo $SOLR_CONFIG_CKAN_DIR" + docker exec test_solr ls /opt/solr/server/solr/ + docker exec test_solr ls /opt/solr/server/solr/ckan/ + docker exec test_solr ls /opt/solr/server/solr/ckan/conf/ + docker exec test_solr ls /opt/solr/server/solr/ckan/conf/solrconfig.xml + docker exec test_solr ls /opt/solr/server/solr/configsets/ckan/conf + docker exec test_solr ls /opt/solr/server/solr/configsets/ckan/conf/managed-schema - name: Create ckan container run: | docker create --name test_ckan --network ${{ job.container.network }} --network-alias ckan \ From bb7cf21c56091a90d756d93d9dab83ce9631d939 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 18:05:47 +0200 Subject: [PATCH 20/24] tests: Add debug statements --- .github/workflows/test.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 262f4294..e5ab1119 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,13 +63,8 @@ jobs: -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/solrconfig.xml":"$SOLR_CONFIG_CKAN_DIR/solrconfig.xml" \ ckan/ckan-solr:${{ matrix.ckan-version }} docker start test_solr - docker exec test_solr bash -c "echo $SOLR_CONFIG_CKAN_DIR" - docker exec test_solr ls /opt/solr/server/solr/ - docker exec test_solr ls /opt/solr/server/solr/ckan/ - docker exec test_solr ls /opt/solr/server/solr/ckan/conf/ - docker exec test_solr ls /opt/solr/server/solr/ckan/conf/solrconfig.xml - docker exec test_solr ls /opt/solr/server/solr/configsets/ckan/conf - docker exec test_solr ls /opt/solr/server/solr/configsets/ckan/conf/managed-schema + docker exec test_solr bash -c "echo $SOLR_SCHEMA_FILE" + docker exec test_solr cat /opt/solr/server/solr/configsets/ckan/conf/managed-schema - name: Create ckan container run: | docker create --name test_ckan --network ${{ job.container.network }} --network-alias ckan \ From 6f361ef5264cbe6aa13867bf6ef04d8a75528e85 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 18:11:20 +0200 Subject: [PATCH 21/24] tests: Fix quotes in env vars --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5ab1119..841a68e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,7 +51,7 @@ jobs: ls ${{ github.workspace }}/ckanext-switzerland-ng/solr/schema.xml docker create --name test_solr --network ${{ job.container.network }} --network-alias solr \ --workdir $WORKDIR --publish 8983:8983 \ - -e "SOLR_HEAP=1024m" -e "SOLR_SCHEMA_FILE=$SOLR_CONFIG_CKAN_DIR/managed-schema" \ + -e SOLR_HEAP=1024m -e SOLR_SCHEMA_FILE="$SOLR_CONFIG_CKAN_DIR/managed-schema" \ -e GITHUB_ACTIONS=true -e CI=true \ -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/schema.xml":"$SOLR_CONFIG_CKAN_DIR/managed-schema" \ -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/english_stop.txt":"$SOLR_CONFIG_CKAN_DIR/english_stop.txt" \ From 82357775f2b231c86c3391393a712d48c844e552 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 18:24:21 +0200 Subject: [PATCH 22/24] tests: Adjust solr setup for CKAN 2.8 solr image --- .github/workflows/test.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 841a68e1..e79f22c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: CKAN_REDIS_URL: redis://redis:6379/1 CKAN_SITE_URL: http://test.ckan.net WORKDIR: /__w/ckanext-geocat/ckanext-geocat - SOLR_CONFIG_CKAN_DIR: /opt/solr/server/solr/configsets/ckan/conf + SOLR_CONFIG_CKAN_DIR: /opt/solr/server/solr/ckan/conf steps: - uses: actions/checkout@v3 @@ -51,9 +51,8 @@ jobs: ls ${{ github.workspace }}/ckanext-switzerland-ng/solr/schema.xml docker create --name test_solr --network ${{ job.container.network }} --network-alias solr \ --workdir $WORKDIR --publish 8983:8983 \ - -e SOLR_HEAP=1024m -e SOLR_SCHEMA_FILE="$SOLR_CONFIG_CKAN_DIR/managed-schema" \ - -e GITHUB_ACTIONS=true -e CI=true \ - -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/schema.xml":"$SOLR_CONFIG_CKAN_DIR/managed-schema" \ + -e SOLR_HEAP=1024m -e GITHUB_ACTIONS=true -e CI=true \ + -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/schema.xml":"$SOLR_CONFIG_CKAN_DIR/schema.xml" \ -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/english_stop.txt":"$SOLR_CONFIG_CKAN_DIR/english_stop.txt" \ -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/fr_elision.txt":"$SOLR_CONFIG_CKAN_DIR/fr_elision.txt" \ -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/french_stop.txt":"$SOLR_CONFIG_CKAN_DIR/french_stop.txt" \ @@ -63,8 +62,6 @@ jobs: -v "${{ github.workspace }}/ckanext-switzerland-ng/solr/solrconfig.xml":"$SOLR_CONFIG_CKAN_DIR/solrconfig.xml" \ ckan/ckan-solr:${{ matrix.ckan-version }} docker start test_solr - docker exec test_solr bash -c "echo $SOLR_SCHEMA_FILE" - docker exec test_solr cat /opt/solr/server/solr/configsets/ckan/conf/managed-schema - name: Create ckan container run: | docker create --name test_ckan --network ${{ job.container.network }} --network-alias ckan \ From c07bdd3e7076426a2b229cc033201e9219400a44 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 18:31:42 +0200 Subject: [PATCH 23/24] tests: Remove debug statement --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e79f22c0..6fd5ad1a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,6 @@ jobs: - name: Create solr container run: | git clone https://github.com/opendata-swiss/ckanext-switzerland-ng.git - ls ${{ github.workspace }}/ckanext-switzerland-ng/solr/schema.xml docker create --name test_solr --network ${{ job.container.network }} --network-alias solr \ --workdir $WORKDIR --publish 8983:8983 \ -e SOLR_HEAP=1024m -e GITHUB_ACTIONS=true -e CI=true \ From ef88bbc0c12d5d2514a86ea4b9d02d7dc17057d1 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Fri, 22 Sep 2023 18:34:34 +0200 Subject: [PATCH 24/24] tests: Remove old schema.xml This is not needed since we now use the one from ckanext-switzerland-ng. --- schema.xml | 237 ----------------------------------------------------- 1 file changed, 237 deletions(-) delete mode 100644 schema.xml diff --git a/schema.xml b/schema.xml deleted file mode 100644 index 0a0a9385..00000000 --- a/schema.xml +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -index_id -text - - - - - - - - - - - - - - - - - - - - - - - -