Skip to content

Commit 7c1826c

Browse files
committed
enable coverage reports
1 parent 54ac128 commit 7c1826c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/runner_ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,8 @@ jobs:
9090
- uses: actions/checkout@v4
9191
- uses: astral-sh/setup-uv@v4
9292
- run: uv sync --extra dev
93-
- run: uv run pytest unit-tests -v
93+
- run: uv run pytest --cov-report term --cov-report html --cov=src/libkernelbot unit-tests -v
94+
- uses: actions/upload-artifact@v4
95+
with:
96+
name: coverage
97+
path: htmlcov/

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,21 @@ dev = [
3030
"ruff",
3131
"pre-commit",
3232
"pytest",
33+
"pytest-coverage"
3334
]
3435

3536
[tool.setuptools.packages.find]
3637
where = ["src"]
3738

39+
[tool.coverage.run]
40+
omit = ["src/libkernelbot/backend.py", "src/libkernelbot/run_eval.py", "src/libkernelbot/launchers/*.py"]
41+
42+
[tool.coverage.report]
43+
exclude_lines = [
44+
"pragma: no cover",
45+
"raise NotImplementedError",
46+
]
47+
3848
[tool.pytest.ini_options]
3949
testpaths = ["scripts", "tests"]
4050
python_files = ["test_*.py", "*_test.py", "ci_test_*.py"]

0 commit comments

Comments
 (0)