@@ -19,16 +19,17 @@ jobs:
19
19
needs : lint
20
20
strategy :
21
21
matrix :
22
- ckan-version : [2.8 ]
22
+ ckan-version : ["2.10", "2.11" ]
23
23
fail-fast : false
24
24
25
25
name : CKAN ${{ matrix.ckan-version }}
26
26
runs-on : ubuntu-latest
27
27
container :
28
- image : openknowledge/ckan-dev:${{ matrix.ckan-version }}
28
+ image : ckan/ckan-dev:${{ matrix.ckan-version }}
29
+ options : --user root
29
30
services :
30
31
solr :
31
- image : ckan/ckan-solr:${{ matrix.ckan-version }}
32
+ image : ckan/ckan-solr:${{ matrix.ckan-version }}-solr9
32
33
postgres :
33
34
image : ckan/ckan-postgres-dev:${{ matrix.ckan-version }}
34
35
env :
37
38
POSTGRES_DB : postgres
38
39
options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
39
40
redis :
40
- image : redis:3
41
+ image : redis:3
41
42
env :
42
43
CKAN_SQLALCHEMY_URL : postgresql://ckan_default:pass@postgres/ckan_test
43
44
CKAN_DATASTORE_WRITE_URL : postgresql://datastore_write:pass@postgres/datastore_test
@@ -47,25 +48,23 @@ jobs:
47
48
CKAN_SITE_URL : http://test.ckan.net
48
49
49
50
steps :
50
- - uses : actions/checkout@v3
51
- - name : Install requirements
52
- run : |
53
- # Replace default path to CKAN core config file with the one on the container
54
- sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini
55
- pip install -r requirements.txt
56
- pip install -r dev-requirements.txt
57
- pip install -e .
58
- # Last commit before support for Python 2 was dropped
59
- pip install -e git+https://github.com/ckan/ckanext-harvest.git@v1.4.2#egg=ckanext-harvest
60
- pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/v1.4.2/requirements.txt
61
- # Last commit before support for Python 2 was dropped
62
- pip install -e git+https://github.com/ckan/ckanext-dcat.git@0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6#egg=ckanext-dcat
63
- pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6/requirements-py2.txt
64
- pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/0c26bed5b7a3a7fca8e7b78e338aace096e0ebf6/dev-requirements-py2.txt
51
+ - name : Checkout
52
+ uses : actions/checkout@v4
53
+ - name : Install requirements
54
+ run : |
55
+ pip install -r requirements.txt
56
+ pip install -r dev-requirements.txt
57
+ pip install -e .
58
+ pip install -e git+https://github.com/ckan/ckanext-harvest.git#egg=ckanext-harvest
59
+ pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/master/requirements.txt
60
+ pip install -e git+https://github.com/ckan/ckanext-dcat.git#egg=ckanext-dcat
61
+ pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/master/requirements.txt
62
+ # Replace default path to CKAN core config file with the one on the container
63
+ sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini
65
64
66
- - name : Setup extension
67
- run : |
68
- paster --plugin= ckan db init -c test.ini
69
- paster --plugin=ckanext-harvest harvester initdb -c test.ini
70
- - name : Run tests
71
- run : nosetests --ckan --nocapture --nologcapture --with-pylons =test.ini --with-coverage --cover-package =ckanext.dcatapchharvest --cover-inclusive --cover-erase --cover-tests ckanext/dcatapchharvest
65
+ - name : Setup extension
66
+ run : |
67
+ ckan -c test.ini db init
68
+ ckan -c test.ini db pending-migrations --apply
69
+ - name : Run tests
70
+ run : pytest --ckan-ini =test.ini --disable-warnings --cov =ckanext.dcatapchharvest ckanext/dcatapchharvest
0 commit comments