From 05121f1d8329688d3793e7d962c25b6806088f01 Mon Sep 17 00:00:00 2001 From: Simon Torres Date: Fri, 26 Jul 2024 11:06:27 -0400 Subject: [PATCH] add coverage report --- .github/workflows/python-package.yml | 5 +++++ tox.ini | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 703f3f3d..e3370e5f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -22,6 +22,11 @@ jobs: os: ubuntu-latest python: '3.12' toxenv: py312-test + + - name: Python 3.12 with Coverage + os: ubuntu-latest + python: '3.12' + toxenv: py312-test-cov - name: Python 3.10 os: ubuntu-latest diff --git a/tox.ini b/tox.ini index 347940ef..46d1bd3f 100644 --- a/tox.ini +++ b/tox.ini @@ -7,9 +7,14 @@ minversion = 4.4.12 description = run the tests with pytest package = wheel wheel_build_env = .pkg + deps = pytest>=6 - pytest-cov mock + cov: pytest-cov + commands = pytest {tty:--color=yes} {posargs} + cov: pytest {tty:--color=yes} --cov goodman_pipeline {posargs} + cov: coverage xml -o '{toxinidir}/coverage.xml' + html: coverage html -d .coverage_html