Skip to content

Commit 95853ef

Browse files
committed
Merge branch 'branch-2.10.8' into backport/patch-2.10.8
# Conflicts: # .github/workflows/cypress.yml # .github/workflows/flake8.yml # .github/workflows/pyright.yml # ckan/logic/schema.py # ckan/public-bs3/base/javascript/client.js # ckan/templates-bs3/admin/config.html # ckan/templates-bs3/admin/index.html # ckan/templates-bs3/footer.html # ckan/templates-bs3/package/search.html # ckan/templates/snippets/search_form.html # ckanext/datatablesview/blueprint.py # test-core.ini ### RESOLVED.
2 parents a877b90 + fd5068d commit 95853ef

File tree

94 files changed

+1090
-459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1090
-459
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969
- <<: *install_deps
7070
- run: |
7171
# Python Dependencies
72+
pip install -r requirement-setuptools.txt
7273
pip install -r requirements.txt
7374
pip install -r dev-requirements.txt
7475
python setup.py develop

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ exclude =
66
./bin
77
per-file-ignores =
88
test_*.py:E501
9+
ckan/lib/helpers.py:F824
10+
ckan/lib/jobs.py:F824
911
extend-exclude =
1012
ckan/__init__.py,ckan/config/middleware.py
1113
ckan/lib/app_globals.py

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v2
41+
uses: actions/checkout@v4
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v1
45+
uses: github/codeql-action/init@v3
4646
with:
4747
languages: ${{ matrix.language }}
4848
config-file: ./.github/codeql/codeql-config.yml
@@ -55,7 +55,7 @@ jobs:
5555
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5656
# If this step fails, then you should remove it and run the build manually (see below)
5757
- name: Autobuild
58-
uses: github/codeql-action/autobuild@v1
58+
uses: github/codeql-action/autobuild@v3
5959

6060
# ℹ️ Command-line programs to run using the OS shell.
6161
# 📚 https://git.io/JvXDl
@@ -69,4 +69,4 @@ jobs:
6969
# make release
7070

7171
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v1
72+
uses: github/codeql-action/analyze@v3

.github/workflows/cypress.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: Cypress
22
on:
3-
workflow_dispatch: # (canada fork only): disable Core repo workflows
4-
# on: [pull_request]
3+
# pull_request:
4+
workflow_call:
5+
workflow_dispatch:
56
env:
67
NODE_VERSION: '16'
7-
PYTHON_VERSION: '3.8'
8+
PYTHON_VERSION: '3.9'
89

910
permissions:
1011
contents: read
@@ -13,8 +14,8 @@ jobs:
1314
cypress:
1415
runs-on: ubuntu-latest
1516
services:
16-
ckan-postgres:
17-
image: postgres:10
17+
ckan_postgres:
18+
image: postgres:15
1819
ports:
1920
- 5432:5432
2021
options: >-
@@ -27,12 +28,12 @@ jobs:
2728
POSTGRES_PASSWORD: pass
2829
POSTGRES_DB: ckan_test
2930

30-
ckan-redis:
31+
ckan_redis:
3132
image: redis
3233
ports:
3334
- 6379:6379
34-
ckan-solr:
35-
image: ckan/ckan-solr:master
35+
ckan_solr:
36+
image: ckan/ckan-solr:2.10-solr9
3637
ports:
3738
- 8983:8983
3839

@@ -46,30 +47,39 @@ jobs:
4647
- uses: actions/setup-python@v5
4748
with:
4849
python-version: ${{ env.PYTHON_VERSION }}
50+
cache: 'pip'
4951
- uses: actions/setup-node@v4
5052
with:
5153
node-version: ${{ env.NODE_VERSION }}
54+
cache: 'npm'
5255

5356
- name: Install python deps
54-
run: pip install -r requirements.txt -r dev-requirements.txt -e.
57+
run: |
58+
pip install -U pip
59+
pip install -r requirements.txt -r dev-requirements.txt -e.
60+
pip check
5561
5662
- name: Init environment
5763
run: |
58-
ckan -c test-core-cypress.ini db init
64+
ckan -c test-core-ci.ini db init
65+
#cypress testing requires activity plugin to be active
66+
ckan config-tool test-core-ci.ini "ckan.plugins = activity"
5967
6068
- name: Run Cypress
61-
uses: cypress-io/github-action@v2
69+
uses: cypress-io/github-action@v6
6270
with:
63-
start: ckan -c test-core-cypress.ini run
71+
start: ckan -c test-core-ci.ini run
6472

65-
- uses: actions/upload-artifact@v1
73+
- uses: actions/upload-artifact@v4
6674
if: failure()
6775
with:
6876
name: cypress-screenshots
6977
path: cypress/screenshots
70-
# Test run video was always captured, so this action uses "always()" condition
71-
- uses: actions/upload-artifact@v1
72-
if: always()
78+
if-no-files-found: ignore
79+
80+
- uses: actions/upload-artifact@v4
81+
if: failure()
7382
with:
7483
name: cypress-videos
7584
path: cypress/videos
85+
if-no-files-found: ignore

.github/workflows/docs.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Docs
2+
on:
3+
workflow_call:
4+
workflow_dispatch:
5+
env:
6+
PYTHON_VERSION: '3.9'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
docs:
13+
runs-on: ubuntu-latest
14+
steps:
15+
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0 # Fetch all history, including tags
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ env.PYTHON_VERSION }}
23+
cache: 'pip'
24+
25+
- name: Install python deps
26+
run: |
27+
pip install -U pip
28+
pip install -r requirements.txt -r dev-requirements.txt -e .
29+
pip check
30+
31+
- name: Create Docs
32+
run: |
33+
sphinx-build doc build/sphinx

.github/workflows/flake8.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Lint
22
on:
3-
workflow_dispatch: # (canada fork only): disable Core repo workflows
4-
# on: [pull_request]
3+
# pull_request:
4+
workflow_call:
5+
workflow_dispatch:
56

67
permissions:
78
contents: read
@@ -10,8 +11,8 @@ jobs:
1011
lint:
1112
runs-on: ubuntu-latest
1213
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-python@v2
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
1516
with:
1617
python-version: '3.8'
1718
- name: Install requirements

.github/workflows/publish-pypi.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
build:
11+
if: github.repository == 'ckan/ckan'
1112
name: Build distribution
1213
runs-on: ubuntu-latest
1314
steps:
@@ -48,3 +49,10 @@ jobs:
4849
path: dist/
4950
- name: Publish distribution to PyPI
5051
uses: pypa/gh-action-pypi-publish@release/v1
52+
53+
publishSkipped:
54+
if: github.repository != 'ckan/ckan'
55+
runs-on: ubuntu-latest
56+
steps:
57+
- run: |
58+
echo "## Skipping PyPI publish on downstream repository" >> $GITHUB_STEP_SUMMARY

.github/workflows/publish-test-pypi.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
build:
11+
if: github.repository == 'ckan/ckan'
1112
name: Build distribution
1213
runs-on: ubuntu-latest
1314
steps:
@@ -54,3 +55,10 @@ jobs:
5455
uses: pypa/gh-action-pypi-publish@release/v1
5556
with:
5657
repository-url: https://test.pypi.org/legacy/
58+
59+
publishSkipped:
60+
if: github.repository != 'ckan/ckan'
61+
runs-on: ubuntu-latest
62+
steps:
63+
- run: |
64+
echo "## Skipping PyPI publish on downstream repository" >> $GITHUB_STEP_SUMMARY

.github/workflows/pyright.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: Check types
22
on:
3-
workflow_dispatch: # (canada fork only): disable Core repo workflows
4-
# on: [pull_request]
3+
# pull_request:
4+
workflow_call:
5+
workflow_dispatch:
56
env:
6-
NODE_VERSION: '16'
7-
PYTHON_VERSION: '3.8'
7+
NODE_VERSION: '18'
8+
PYTHON_VERSION: '3.9'
89

910
permissions:
1011
contents: read
@@ -17,9 +18,11 @@ jobs:
1718
- uses: actions/setup-python@v5
1819
with:
1920
python-version: ${{ env.PYTHON_VERSION }}
21+
cache: 'pip'
2022
- uses: actions/setup-node@v4
2123
with:
2224
node-version: ${{ env.NODE_VERSION }}
25+
cache: 'npm'
2326
- name: Install python deps
2427
run: pip install -r requirements.txt -r dev-requirements.txt -e.
2528
- name: Install node deps

0 commit comments

Comments
 (0)