From 33dd9eb44e0747515407b0625d0311cceac30398 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Wed, 9 Aug 2023 23:54:39 +0200 Subject: [PATCH] configure coverage --- .github/workflows/pythonpackage.yml | 10 ++++++++++ .gitignore | 2 ++ tox.ini | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 3351f5e..c485493 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 22c4005..b89c3ee 100644 --- a/.gitignore +++ b/.gitignore @@ -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 + diff --git a/tox.ini b/tox.ini index c447b58..3827975 100644 --- a/tox.ini +++ b/tox.ini @@ -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]