From d356c9a48d80adeef44e3c85afce9d45674671ac Mon Sep 17 00:00:00 2001 From: amercader Date: Tue, 16 Apr 2024 13:15:05 +0200 Subject: [PATCH 1/6] Update action versions, test on master (2.11) --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d782292f..4fe04f76 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,10 +4,10 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.9' - name: Install requirements run: pip install flake8 pycodestyle - name: Check syntax @@ -17,13 +17,13 @@ jobs: needs: lint strategy: matrix: - ckan-version: ["2.10", 2.9] + ckan-version: ["master", "2.10", 2.9] fail-fast: false name: CKAN ${{ matrix.ckan-version }} runs-on: ubuntu-latest container: - image: openknowledge/ckan-dev:${{ matrix.ckan-version }} + image: ckan/ckan-dev:${{ matrix.ckan-version }} services: solr: image: ckan/ckan-solr:${{ matrix.ckan-version }} @@ -44,7 +44,7 @@ jobs: CKAN_REDIS_URL: redis://redis:6379/1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install requirements run: | pip install -r requirements.txt From d4e98b1aa4e124269f87a7ce4fee44aab0b6344d Mon Sep 17 00:00:00 2001 From: amercader Date: Tue, 16 Apr 2024 13:27:12 +0200 Subject: [PATCH 2/6] Update codecov action --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fe04f76..72181a7e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,6 +66,7 @@ jobs: - name: Run tests run: pytest --ckan-ini=test.ini --cov=ckanext.dcat --cov-report=xml --cov-append --disable-warnings ckanext/dcat/tests - name: Upload coverage report to codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v4 with: - file: ./coverage.xml + files: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} From 97877407fba276b128916c3a37b6f17162459343 Mon Sep 17 00:00:00 2001 From: amercader Date: Tue, 16 Apr 2024 13:27:19 +0200 Subject: [PATCH 3/6] Use different block for structured data snippet The old `body_extras` block was removed in ckan/ckan#7672 (CKAN 2.11), so we now use `scripts` --- ckanext/dcat/templates/package/read_base.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ckanext/dcat/templates/package/read_base.html b/ckanext/dcat/templates/package/read_base.html index 6d2216f1..4c6023c6 100644 --- a/ckanext/dcat/templates/package/read_base.html +++ b/ckanext/dcat/templates/package/read_base.html @@ -12,7 +12,7 @@ {% endwith %} {% endif %} {% endblock -%} -{% block body_extras %} +{% block scripts %} {{ super() }} {% block structured_data %} {# @@ -22,7 +22,6 @@ More information about structured data: https://developers.google.com/search/docs/guides/intro-structured-data #} - {% if h.helper_available('structured_data') %}