Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Codecov reports coverage, and does not comment or fail a pull request. Only
# "All tests passed" and the PR title are required checks (see CONTRIBUTING.md).
comment: false

coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
key: robot-descriptions-v2-${{ runner.os }}-3.12

- name: Run coverage
run: pytest tests/ --ignore=tests/test_blocks.py --cov=src/roboticstoolbox --cov-report=xml:coverage.xml -q
run: pytest tests/ --ignore=tests/test_blocks.py --cov=roboticstoolbox --cov-report=xml:coverage.xml -q

- uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
Expand Down
23 changes: 22 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -379,5 +379,26 @@ module = [
]
ignore_errors = true

# CI installs the package and runs the tests against the installed copy, so coverage
# measures it by name. [tool.coverage.paths] maps the installed files back to src/,
# so that the report, and Codecov, use the paths of the repository.
[tool.coverage.run]
omit = ["src/roboticstoolbox/demo/*", "test_*.py"]
source = ["roboticstoolbox"]
relative_files = true
omit = ["src/roboticstoolbox/demo/*", "*/roboticstoolbox/demo/*", "test_*.py"]

[tool.coverage.paths]
source = ["src/roboticstoolbox", "*/site-packages/roboticstoolbox"]

# Left out of the report, since they have no tests or cannot be measured
[tool.coverage.report]
omit = [
# sketches for hardware, with no tests, that nobody maintains
"*/roboticstoolbox/backends/Dynamixel/*",
"*/roboticstoolbox/backends/ROS/*",
# the unfinished port of DHFactor, which nothing imports
"*/roboticstoolbox/robot/DHFactor.py",
"*/roboticstoolbox/tools/DHFactor.py",
# the command-line tools run in a subprocess in the tests, which coverage does not trace
"*/roboticstoolbox/bin/*",
]
Loading