-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from liip/tests/fix-tests
Tests/fix tests
- Loading branch information
Showing
27 changed files
with
304 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
python-version: '3.10' | ||
- name: Install requirements | ||
run: pip install flake8 pycodestyle black isort | ||
- name: Check syntax and complexity | ||
|
@@ -47,6 +47,7 @@ jobs: | |
CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgres/datastore_test | ||
CKAN_SOLR_URL: http://solr:8983/solr/ckan | ||
CKAN_REDIS_URL: redis://redis:6379/1 | ||
CKAN_SITE_URL: http://odp.test | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -55,14 +56,23 @@ jobs: | |
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
pip install -e . | ||
pip install -e git+https://github.com/ckan/[email protected]#egg=ckanext-dcat | ||
pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v1.5.1/requirements.txt | ||
pip install -e git+https://gitlab.liip.ch/odp_oev_schweiz/ckanext-harvest.git#egg=ckanext-harvest | ||
pip install -r https://gitlab.liip.ch/odp_oev_schweiz/ckanext-harvest/-/raw/main/requirements.txt | ||
pip install -e git+https://github.com/ckan/[email protected]#egg=ckanext-scheming | ||
pip install -e git+https://github.com/ckan/ckanext-fluent.git#egg=ckanext-fluent | ||
pip install -r https://raw.githubusercontent.com/ckan/ckanext-fluent/master/requirements.txt | ||
pip install -e git+https://gitlab.liip.ch/odp_oev_schweiz/[email protected]#egg=ckanext-discourse | ||
pip install -e git+https://github.com/opendata-swiss/ckanext-ogdchcommands.git#egg=ckanext-ogdchcommands | ||
pip install -e 'git+https://github.com/ckan/[email protected]#egg=ckanext-xloader' | ||
pip install -r https://raw.githubusercontent.com/ckan/ckanext-xloader/1.0.1/requirements.txt | ||
pip install -U requests[security] | ||
- name: Setup extension | ||
run: | | ||
# 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 | ||
ckan -c test.ini db init | ||
ckan -c test.ini harvester initdb | ||
- name: Run tests | ||
run: nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.switzerland \ | ||
--cover-inclusive --cover-erase --cover-tests | ||
run: pytest --ckan-ini=test.ini --disable-warnings --cov=ckanext.switzerland |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,7 @@ htmlcov/ | |
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/_build/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copied from ckanext-harvester. | ||
|
||
import pytest | ||
|
||
import ckanext.harvest.model as harvest_model | ||
from ckanext.harvest import queue | ||
|
||
|
||
@pytest.fixture | ||
def harvest_setup(): | ||
harvest_model.setup() | ||
|
||
|
||
@pytest.fixture | ||
def clean_queues(): | ||
queue.purge_queues() |
Oops, something went wrong.