Skip to content

Commit

Permalink
merge codecov, black fixes from main (#110)
Browse files Browse the repository at this point in the history
* fix python black issue (#108)

(cherry picked from commit 558c7f7)

* pytest: Create xml coverage report for codecov (#109)

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)

* add safety suppressions

---------

Co-authored-by: Till Maas <opensource@till.name>
  • Loading branch information
richm and tyll authored Feb 10, 2023
1 parent a30469e commit 3e9aab5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 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
1 change: 0 additions & 1 deletion tests/unit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

# mocks the tox.config.Config class
class MockConfig(object):

# pylint: disable=too-many-instance-attributes
__slots__ = (
"_parser",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ deps =
tox20: tox==2.4
py{26,27}: mock
commands =
{env:SAFETY_CMD:safety} check -i 47833 -i 42559 -i 42218 -i 40291 -i 38765 -i 39611 -i 44492 -i 51457 -i 51499 --full-report # ignore pip, PyYAML problems
{env:SAFETY_CMD:safety} check -i 52495 -i 47833 -i 42559 -i 42218 -i 40291 -i 38765 -i 39611 -i 44492 -i 51457 -i 51499 --full-report # ignore pip, PyYAML problems
pytest --cov=tox_lsr --cov-report=term-missing tests
{env:COVERALLS_CMD:coveralls --output={envname}-coverage.txt}

Expand Down

0 comments on commit 3e9aab5

Please sign in to comment.