diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ddd017..5720b9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: run: | set -euo pipefail python -m pip install --upgrade pip - python -m pip install -e . pandas pytest ruff + python -m pip install -e . pandas pytest pytest-cov ruff python -m pip install --no-deps -e external/QuantPlatformKit - name: Run Ruff @@ -62,4 +62,4 @@ jobs: - name: Run unit tests run: | set -euo pipefail - PYTHONPATH=src python -m pytest -q tests + PYTHONPATH=src python -m pytest -q tests --cov --cov-report=term --cov-report=xml diff --git a/pyproject.toml b/pyproject.toml index 7eba274..bd39bce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,3 +26,11 @@ where = ["src"] ignore = ["E701", "E702", "E741", "F841", "F821", "B008", "F401", "F601", "E402"] target-version = "py311" line-length = 120 + +[tool.coverage.run] +branch = true +source = ["src"] +omit = ["tests/*", "*/external/*"] + +[tool.coverage.report] +show_missing = true