From: Sebastián Ramírez Date: Sun, 18 Aug 2024 21:15:32 +0000 (-0500) Subject: 🔧 Update coverage config files (#1077) X-Git-Tag: 0.0.22~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e448c339dba0f24d75fe8bf6abc4c02b89acca2d;p=thirdparty%2Ffastapi%2Fsqlmodel.git 🔧 Update coverage config files (#1077) --- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8fbbc324..86e91cb6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -100,7 +100,7 @@ jobs: - run: ls -la coverage - run: coverage combine coverage - run: coverage report - - run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}" + - run: coverage html --title "Coverage for ${{ github.sha }}" - name: Store coverage HTML uses: actions/upload-artifact@v4 diff --git a/pyproject.toml b/pyproject.toml index a27309b0..e3b70b5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,14 +73,18 @@ optional-dependencies = {} [tool.coverage.run] parallel = true +data_file = "coverage/.coverage" source = [ "docs_src", "tests", "sqlmodel" ] context = '${CONTEXT}' +dynamic_context = "test_function" [tool.coverage.report] +show_missing = true +sort = "-Cover" exclude_lines = [ "pragma: no cover", "@overload", @@ -88,6 +92,9 @@ exclude_lines = [ "if TYPE_CHECKING:", ] +[tool.coverage.html] +show_contexts = true + [tool.mypy] strict = true diff --git a/scripts/test.sh b/scripts/test.sh index 9b758bdb..ff4b114b 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -5,5 +5,5 @@ set -x coverage run -m pytest tests coverage combine -coverage report --show-missing +coverage report coverage html