code-coverage fix (#1395)

pull/1329/merge
Chris Caron 2025-08-17 11:12:33 -04:00 committed by GitHub
parent c15243a9cc
commit c00c36f8f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 7 deletions

View File

@ -2,10 +2,9 @@ codecov:
require_ci_to_pass: false
comment:
layout: "reach,diff,flags,files"
require_changes: false
behavior: update
after_n_builds: 1
layout: "diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
coverage:
status:

View File

@ -108,4 +108,8 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
verbose: false # Used for debugging only
fail_ci_if_error: false # Avoid failing job if Codecov is down
env:
CODECOV_PR: ${{ github.event.pull_request.number }}
CODECOV_SHA: ${{ github.sha }}

View File

@ -348,7 +348,7 @@ builtins-ignorelist = ["_"]
[tool.pytest.ini_options]
# Keep pytest-cov minimal, let Coverage.py control formatting.
addopts = "-ra --cov=apprise --cov-branch --cov-report=xml"
addopts = "-ra"
testpaths = ["tests"]
python_files = ["test_*.py", "tests/test_*.py"]
filterwarnings = ["once::Warning"]

View File

@ -116,16 +116,20 @@ description = Full tests with all plugins + code coverage
extras = dev,all-plugins
commands =
pip install --no-cache-dir -e ".[dev,all-plugins]"
coverage erase
coverage run --source=apprise -m pytest tests {posargs}
coverage report
coverage report -m
coverage xml -o coverage.xml
[testenv:minimal]
description = Minimal dependencies + code coverage
extras = dev
commands =
pip install --no-cache-dir -e ".[dev]"
coverage erase
coverage run --source=apprise -m pytest tests {posargs}
coverage report
coverage report -m
coverage xml -o coverage.xml
[testenv:test]
description = Run simplified tests without coverage