From 2f58e18a22bffbbc8292620c4925f2efc26db825 Mon Sep 17 00:00:00 2001 From: catborise Date: Sun, 18 Oct 2026 22:55:00 +0300 Subject: [PATCH] ci: the coverage floor follows the measured 77%, and one leg uploads its report The floor stayed at 50% while CI measures 77% on every leg; it is now 76%. The Python 3.12 / SQLite leg uploads the HTML report as the coverage-html artifact, also when the tests fail. --- .github/workflows/test.yml | 12 ++++++++++++ pyproject.toml | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ae36a03..4bc8b022 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,6 +95,18 @@ jobs: coverage run manage.py test coverage report --skip-covered + # The per-file report of one leg, to see what a change left untested + - name: Store Coverage Report + if: always() && matrix.python-version == '3.12' && matrix.database == 'sqlite' + run: coverage html -d coverage-html --fail-under=0 + + - name: Upload Coverage Report + if: always() && matrix.python-version == '3.12' && matrix.database == 'sqlite' + uses: actions/upload-artifact@v4 + with: + name: coverage-html + path: coverage-html + - name: Validate OpenAPI Schema run: python manage.py spectacular --validate --fail-on-warn --file /dev/null diff --git a/pyproject.toml b/pyproject.toml index 0442136e..c1bf089d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,5 +15,5 @@ source = ["."] omit = [".venv/*", "*/migrations/*", "*/tests/*", "manage.py", "webvirtcloud/settings*.py"] [tool.coverage.report] -# Measured 51% without the live libvirt suite (2026-10-03); raise as tests grow. -fail_under = 50 +# CI measures 77% without the live libvirt suite (2026-10-18); raise as tests grow. +fail_under = 76