Skip to content
Snippets Groups Projects
Commit 6bbe4147 authored by Christoph Alt's avatar Christoph Alt
Browse files

added coverage testing

parent 714ac321
No related merge requests found
Pipeline #55765 passed with stages
in 47 seconds
...@@ -6,4 +6,6 @@ __pycache__/ ...@@ -6,4 +6,6 @@ __pycache__/
*.egg-info/ *.egg-info/
.env .env
.tox .tox
report.xml *.xml
.coverage
...@@ -11,6 +11,13 @@ test: ...@@ -11,6 +11,13 @@ test:
script: script:
- pip install tox - pip install tox
- tox -e py38 - tox -e py38
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit:
- report.xml
deploy_uniformgrid_gpu: deploy_uniformgrid_gpu:
stage: deploy stage: deploy
......
...@@ -5,7 +5,7 @@ description="Collection of scripts and wrapper of contious benchmarking" ...@@ -5,7 +5,7 @@ description="Collection of scripts and wrapper of contious benchmarking"
readme = "README.md" readme = "README.md"
requires-python = ">=3.8" requires-python = ">=3.8"
authors = [ authors = [
{ name = "Christoph Alt", email="christoph.alt@fau.de" } { name = "Christoph Alt", email="christoph.alt@fau.de" }
] ]
license = { file = "LICENSE" } license = { file = "LICENSE" }
...@@ -26,10 +26,24 @@ plotting = [ ...@@ -26,10 +26,24 @@ plotting = [
dashboard = [ dashboard = [
"grafanalib", "grafanalib",
] ]
test = ["pytest"] test = [
"coverage",
"pytest",
"pytest-cov"
]
[project.scripts] [project.scripts]
get_frequency = "cbutil.cpu_frequency:main" get_frequency = "cbutil.cpu_frequency:main"
[tools.setuptools] [tools.setuptools]
packages = ["cbutil", "cbutil.postprocessing", "dashboards", "plotting"] packages = ["cbutil", "cbutil.postprocessing", "dashboards", "plotting"]
[tool.coverage.run]
branch = true
source = ["cbutil", "dashboards", "plotting"]
exclude_lines = [
"if __name__ == __main__",
]
[tool.coverage.html]
directory = "coverage_html_report"
...@@ -3,4 +3,6 @@ envlist = py38, py310, py311 ...@@ -3,4 +3,6 @@ envlist = py38, py310, py311
[testenv] [testenv]
extras = dashboard, plotting, test extras = dashboard, plotting, test
commands = pytest --junitxml=report.xml commands =
pytest --junitxml=report.xml
pytest --cov --cov-report html --cov-report term --cov-report xml
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment