diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d027b5..9c0b363 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,18 +50,25 @@ jobs: - name: Install requirements run: | pip install -r requirements.txt - pip install -r dev-requirements.txt pip install -e . # 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 + - name: Setup extension (CKAN 2.10) + if: ${{ matrix.ckan-version == '2.10' }} + run: | + pip install -r dev-requirements.txt + ckan -c test.ini db init + ckan -c test.ini db upgrade -p googleanalytics - name: Setup extension (CKAN >= 2.9) if: ${{ matrix.ckan-version != '2.7' && matrix.ckan-version != '2.8' }} run: | + pip install -r dev-requirements-2.9.txt ckan -c test.ini db init ckan -c test.ini db upgrade -p googleanalytics - name: Setup extension (CKAN < 2.9) if: ${{ matrix.ckan-version == '2.7' || matrix.ckan-version == '2.8' }} run: | + pip install -r dev-requirements-2.9.txt paster --plugin=ckan db init -c test.ini paster --plugin=ckanext-googleanalytics initdb -c test.ini - name: Run tests diff --git a/dev-requirements-2.9.txt b/dev-requirements-2.9.txt new file mode 100644 index 0000000..72345ad --- /dev/null +++ b/dev-requirements-2.9.txt @@ -0,0 +1,2 @@ +pytest-ckan +pytestfactoryboy \ No newline at end of file