Skip to content

Commit

Permalink
pytest: Create xml coverage report for codecov (linux-system-roles#109)
Browse files Browse the repository at this point in the history
Create the XML coverage report since this is the one that is needed for
codecov.

Note: codecov uses some heuristics to find the coverage file and it does
not seem to be possible to specify which file to use. The
get_coverage.yml playbook is also wrongly identified as a coverage
report which can be confusing if the actual report is not identified as
one.

Signed-off-by: Till Maas <opensource@till.name>
(cherry picked from commit ab14427)
  • Loading branch information
tyll authored and richm committed Feb 10, 2023
1 parent c66bea9 commit ae52ae6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tox_lsr/config_files/tox-default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ commands =
python -m pytest -c {[lsr_pytest]configfile} --durations=5 \
--cov={toxinidir}/library --cov={toxinidir}/module_utils \
--cov-report=html:htmlcov-{envname} \
--cov-report=xml:coverage-{envname}.xml \
--cov-report=term {env:RUN_PYTEST_EXTRA_ARGS:} {posargs} {env:RUN_PYTEST_UNIT_DIR:unit} ; \
fi'
{[lsr_config]commands_post}
Expand Down

0 comments on commit ae52ae6

Please sign in to comment.