diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..f7fd421d6 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,54 @@ +[run] +branch=True +cover_pylib=False +concurrency=thread +data_file=.coverage +disable_warnings= + trace-changed + module-not-python + module-not-imported + no-data-collected + module-not-measured + # include-ignored +omit = + venv/* + janis_core/tests/* + setup.py +parallel = True +plugins= +include= + janis_core/* +timid = False + + +[report] + +exclude_lines = + pragma: no cover + def __repr__ + raise NotImplementedError + if __name__ == .__main__.: + def parse_args + def main +fail_under=0 +ignore_errors = False +omit = + venv/* + janis_core/tests/* + setup.py +precision=2 +show_missing=False +skip_covered=False +sort=Name + +[html] + +directory=htmlcov +extra_css= +title= + + +[xml] + +output=coverage.xml +package_depth=99 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index be3676d7c..4a0e06df6 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -1,6 +1,6 @@ name: Unit Tests -on: [push] +on: [push, pull_request] jobs: build: diff --git a/.gitignore b/.gitignore index fd10dad8b..a1d5bfc73 100644 --- a/.gitignore +++ b/.gitignore @@ -79,10 +79,8 @@ docs/_build/ janis_pipelines.egg-info/ dist/ build/ - - - - +tests_output/ +htmlcov/ \.mypy_cache/ *.egg-info diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 000000000..b3250667d --- /dev/null +++ b/pytest.ini @@ -0,0 +1,7 @@ +[pytest] +addopts = + --cov + --doctest-modules + --ignore janis_core/tests/ +testpaths = + janis_core diff --git a/requirements/tests.txt b/requirements/tests.txt index cd73ddf6e..152f2a74b 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -3,4 +3,5 @@ nose codecov coverage requests_mock -pytest \ No newline at end of file +pytest +pytest-cov \ No newline at end of file