fix: configure codecov token and coverage paths

- Add CODECOV_TOKEN to codecov-action uploads (required for v4)
- Change unit test coverage from single file to entire package
- Add codecov.yml with coverage thresholds and flags

Note: CODECOV_TOKEN secret must be added to repository settings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
torlando-tech 2025-12-30 14:07:24 -05:00
commit b1206b3c6e
2 changed files with 36 additions and 1 deletions

View file

@ -86,7 +86,7 @@ jobs:
run: |
# Run only unit tests (fragmentation and prioritization)
python -m pytest tests/test_fragmentation.py tests/test_prioritization.py -v \
--cov=src/ble_reticulum/BLEFragmentation.py \
--cov=src/ble_reticulum \
--cov-report=term-missing \
--cov-report=xml:coverage-unit.xml
continue-on-error: false
@ -95,6 +95,7 @@ jobs:
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage-unit.xml
flags: unit
fail_ci_if_error: false
@ -151,6 +152,7 @@ jobs:
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage-integration.xml
flags: integration
fail_ci_if_error: false

33
codecov.yml Normal file
View file

@ -0,0 +1,33 @@
coverage:
precision: 2
round: down
range: "60...100"
status:
project:
default:
target: auto
threshold: 5%
patch:
default:
target: 80%
threshold: 5%
comment:
layout: "reach,diff,flags,files"
behavior: default
require_changes: true
flags:
unit:
paths:
- src/ble_reticulum/
carryforward: true
integration:
paths:
- src/ble_reticulum/
carryforward: true
ignore:
- "tests/**/*"
- "**/__pycache__/**"
- "**/conftest.py"