From: Sebastián Ramírez Date: Sun, 18 Aug 2024 21:07:03 +0000 (-0500) Subject: 🔧 Update coverage config files (#12035) X-Git-Tag: 0.112.2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f1eb0cd9e571a68fab19eecbdc59cc27aa7e6f4;p=thirdparty%2Ffastapi%2Ffastapi.git 🔧 Update coverage config files (#12035) --- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a33b6a68a2..0458f83ffe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -117,7 +117,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 with: diff --git a/pyproject.toml b/pyproject.toml index 8db2d2b2d3..bb87be470e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -165,6 +165,7 @@ filterwarnings = [ [tool.coverage.run] parallel = true +data_file = "coverage/.coverage" source = [ "docs_src", "tests", @@ -177,6 +178,13 @@ omit = [ "docs_src/response_model/tutorial003_04_py310.py", ] +[tool.coverage.report] +show_missing = true +sort = "-Cover" + +[tool.coverage.html] +show_contexts = true + [tool.ruff.lint] select = [ "E", # pycodestyle errors diff --git a/scripts/test-cov-html.sh b/scripts/test-cov-html.sh index 85aef96018..517ac6422e 100755 --- a/scripts/test-cov-html.sh +++ b/scripts/test-cov-html.sh @@ -5,5 +5,5 @@ set -x bash scripts/test.sh ${@} coverage combine -coverage report --show-missing -coverage html --show-contexts +coverage report +coverage html