From 97448b4887787840377fb8bc33c25fb10a9bc365 Mon Sep 17 00:00:00 2001 From: pdelboca Date: Mon, 30 May 2022 11:42:27 +0200 Subject: [PATCH] Manage pytest requirements for CKAN versions --- .github/workflows/test.yml | 9 ++++++++- dev-requirements-2.9.txt | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 dev-requirements-2.9.txt 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