configure coverage

This commit is contained in:
Patrick Kanzler 2023-08-09 23:54:39 +02:00
parent c55af97f3b
commit 33dd9eb44e
3 changed files with 13 additions and 1 deletions

View File

@ -41,3 +41,13 @@ jobs:
tox
env:
ESCPOS_CAPABILITIES_FILE: /home/runner/work/python-escpos/python-escpos/capabilities-data/dist/capabilities.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml,!./cache
flags: unittests
name: codecov-umbrella
verbose: true

2
.gitignore vendored
View File

@ -22,6 +22,7 @@ dist/
src/escpos/version.py
.hypothesis
.pytest_cache/
coverage.xml
# pyenv
.python-version
@ -40,3 +41,4 @@ test/test-cli-output/
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

View File

@ -21,7 +21,7 @@ deps = jaconv
pytest-mock
hypothesis>4
python-barcode
commands = pytest --cov escpos
commands = pytest --cov escpos --cov-report=xml
passenv = ESCPOS_CAPABILITIES_PICKLE_DIR, ESCPOS_CAPABILITIES_FILE, CI, TRAVIS, TRAVIS_*, APPVEYOR, APPVEYOR_*, CODECOV_*
[testenv:docs]