ci: changed testing to use coverage instead of pytest-cov
CI for xil_bec / test (push) Successful in 30s

This commit is contained in:
2026-08-14 10:57:28 +02:00
parent 89f335ccfe
commit 08954e945e
2 changed files with 19 additions and 1 deletions
+8 -1
View File
@@ -99,4 +99,11 @@ jobs:
- name: Run Pytest with Coverage
id: coverage
run: pytest --random-order --cov=./xil_bec --cov-config=./xil_bec/pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./xil_bec/tests/ || test $? -eq 5
shell: bash
# Uses the plain `coverage` CLI (pytest-cov is not a dependency anymore).
# `|| test $? -eq 5` keeps an empty test collection from failing the job.
run: |
cd ./xil_bec
coverage run --branch --source=./xil_bec -m pytest --random-order ./tests/ || test $? -eq 5
coverage report
coverage xml -o coverage.xml
+11
View File
@@ -55,6 +55,17 @@ plugin_widgets_update = "xil_bec.bec_widgets.auto_updates"
[project.entry-points."bec.widgets.user_widgets"]
plugin_widgets = "xil_bec.bec_widgets.widgets"
[tool.coverage.report]
skip_empty = true # exclude empty *files*, e.g. __init__.py, from the report
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"return NotImplemented",
"raise NotImplementedError",
"\\.\\.\\.",
'if __name__ == "__main__":',
]
[tool.hatch.build.targets.wheel]
include = ["*"]