Skip to content

Commit 5db48f0

Browse files
author
Agent
committed
Add test coverage measurement and CodeCov upload to CI
- Add --cov-report=xml to tox.ini so pytest-cov emits coverage.xml - Add git to dnf install in gating.yaml; the codecov-action requires it at runtime and the container image does not ship it by default - Add codecov/codecov-action@v5 step to gating.yaml to upload coverage results to CodeCov using OIDC authentication Closes #76 Generated-By: OpenCode (google-vertex-anthropic/claude-sonnet-4-6@default)
1 parent 6552ee2 commit 5db48f0

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/gating.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
sudo dnf update -y &&
2121
sudo dnf install -y
2222
findutils
23+
git
2324
make
2425
python3-ldap
2526
python3-mock
@@ -35,3 +36,9 @@ jobs:
3536
run: tox -e docs
3637
- name: tests
3738
run: tox -e py3
39+
- uses: codecov/codecov-action@v5
40+
with:
41+
use_oidc: true
42+
flags: unit-tests
43+
files: ./coverage.xml
44+
fail_ci_if_error: false

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ commands =
1919
-W "ignore:inspect.getargspec:DeprecationWarning" \
2020
-W "ignore:This method will be removed in future versions. Use 'parser.read_file()':DeprecationWarning" \
2121
-W "ignore:Use .persist_selectable:DeprecationWarning" \
22+
--cov-report=xml \
2223
{posargs}
2324
sitepackages = True
2425

0 commit comments

Comments
 (0)