77 - uses : actions/checkout@v3
88 - uses : actions/setup-python@v2
99 with :
10- python-version : ' 3.9 '
10+ python-version : ' 3.10 '
1111 - name : Install requirements
1212 run : pip install flake8 pycodestyle
1313 - name : Check syntax
@@ -19,16 +19,21 @@ jobs:
1919 needs : lint
2020 strategy :
2121 matrix :
22- ckan-version : [2.9, 2.9-py2, 2.8, 2.7]
22+ include :
23+ - ckan-version : " 2.11"
24+ ckan-image : " ckan/ckan-dev:2.11-py3.10"
25+ - ckan-version : " 2.10"
26+ ckan-image : " ckan/ckan-dev:2.10-py3.10"
2327 fail-fast : false
2428
2529 name : CKAN ${{ matrix.ckan-version }}
2630 runs-on : ubuntu-latest
2731 container :
28- image : openknowledge/ckan-dev:${{ matrix.ckan-version }}
32+ image : ${{ matrix.ckan-image }}
33+ options : --user root
2934 services :
3035 solr :
31- image : ckan/ckan-solr:${{ matrix.ckan-version }}
36+ image : ckan/ckan-solr:${{ matrix.ckan-version }}-solr9
3237 postgres :
3338 image : ckan/ckan-postgres-dev:${{ matrix.ckan-version }}
3439 env :
@@ -46,24 +51,55 @@ jobs:
4651 CKAN_REDIS_URL : redis://redis:6379/1
4752
4853 steps :
54+
4955 - uses : actions/checkout@v3
56+ - name : Setup qsv
57+ run : |
58+ apt install unzip
59+ wget https://github.com/jqnatividad/qsv/releases/download/3.3.0/qsv-3.3.0-x86_64-unknown-linux-musl.zip
60+ unzip qsv-3.3.0-x86_64-unknown-linux-musl.zip -d $RUNNER_TEMP/qsvbin
61+ echo "$RUNNER_TEMP/qsvbin" >> $GITHUB_PATH
62+
63+ - run : qsv --version
64+
5065 - name : Install requirements
5166 run : |
52- apk add file
5367 pip install -r requirements.txt
5468 pip install -r dev-requirements.txt
5569 pip install -e .
5670 # Replace default path to CKAN core config file with the one on the container
5771 sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini
58- - name : Setup extension (CKAN >= 2.9)
59- if : ${{ matrix.ckan-version != '2.7' && matrix.ckan-version != '2.8' }}
72+
73+ # Replace qsv bin to one in path, will produce error in logs
74+ sed -i -e 's/ckanext.qa.qsv_bin.*/ckanext.qa.qsv_bin = qsv/' test.ini
75+
76+ - name : Setup extension
6077 run : |
6178 ckan -c test.ini db init
62- ckan -c test.ini qa init
63- - name : Setup extension (CKAN < 2.9)
64- if : ${{ matrix.ckan-version == '2.7' || matrix.ckan-version == '2.8' }}
65- run : |
66- paster --plugin=ckan db init -c test.ini
67- paster --plugin=ckanext-qa qa init -c test.ini
79+ ckan -c test.ini db upgrade -p qa
80+
6881 - name : Run tests
69- run : pytest --ckan-ini=test.ini --cov=ckanext.qa --disable-warnings ckanext/qa/tests
82+ run : pytest --ckan-ini=test.ini --cov=ckanext.qa --disable-warnings ckanext/qa/tests --junitxml=junit.xml -o junit_family=legacy
83+
84+ - name : install codecov requirements
85+ run : |
86+ apt-get update
87+ apt-get install -y curl gpg
88+
89+ - name : Upload coverage reports to Codecov
90+ uses : codecov/codecov-action@v5
91+ if : ${{ !cancelled() }}
92+ continue-on-error : true # don't fail if we can't upload (ie a fork that does not have integration plugged in)
93+ with :
94+ token : ${{ secrets.CODECOV_TOKEN }}
95+ verbose : false # optional (default = false)
96+ flags : ckan-${{ matrix.ckan-version }}
97+
98+ - name : Upload test results to Codecov
99+ uses : codecov/test-results-action@v1
100+ if : ${{ !cancelled() }}
101+ continue-on-error : true # don't fail if we can't upload (ie a fork that does not have integration plugged in)
102+ with :
103+ token : ${{ secrets.CODECOV_TOKEN }}
104+ verbose : false # optional (default = false)
105+ flags : ckan-${{ matrix.ckan-version }}
0 commit comments