From 451a61c6a1d548366e7ddb332ab68539ef2198f6 Mon Sep 17 00:00:00 2001 From: Simone Date: Thu, 14 May 2026 23:04:56 +0200 Subject: [PATCH] test: bump coverage gate from 80%% to 90%% Update --cov-fail-under in lint workflow + docs (AGENTS, README, ARCHITECTURE). Note: A5 closeout reported 80.10%% so this run will likely fail until additional tests are added. --- .gitea/workflows/lint.yml | 4 ++-- AGENTS.md | 4 ++-- README.md | 4 ++-- docs/ARCHITECTURE.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml index 237ff52..d3fdec2 100644 --- a/.gitea/workflows/lint.yml +++ b/.gitea/workflows/lint.yml @@ -140,9 +140,9 @@ jobs: & $venvPy -m mypy --strict src if ($LASTEXITCODE -ne 0) { throw "mypy failed" } - - name: pytest (coverage >= 80%) + - name: pytest (coverage >= 90%) shell: powershell run: | $venvPy = Join-Path $env:VENV_DIR 'Scripts\python.exe' - & $venvPy -m pytest tests/python --cov=ci_orchestrator --cov-fail-under=80 + & $venvPy -m pytest tests/python --cov=ci_orchestrator --cov-fail-under=90 if ($LASTEXITCODE -ne 0) { throw "pytest failed" } diff --git a/AGENTS.md b/AGENTS.md index be9dc70..f37ff9f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -65,7 +65,7 @@ per compatibilita' con Task Scheduler e caller esterni. | Venv produzione | `F:\CI\python\venv\` (interprete `F:\CI\python\venv\Scripts\python.exe`) | | Venv dev locale | `.venv\` (NON committare; gitignored) | | Install editable | `python -m pip install -e .[dev]` | -| Test | `python -m pytest tests\python -q --cov=ci_orchestrator --cov-fail-under=80` | +| Test | `python -m pytest tests\python -q --cov=ci_orchestrator --cov-fail-under=90` | | Lint | `python -m ruff check src tests\python` | | Type-check | `python -m mypy --strict src` | @@ -106,7 +106,7 @@ Restano in PowerShell (girano sull'host fuori dal flusso CI o nel guest): `template/Prepare-*.ps1`, `template/Install-CIToolchain-*.ps1` e i `tests/Test-*.ps1` di smoke locale. -**Test gate**: coverage totale ≥80% (alzato in A5). Nuovi moduli devono +**Test gate**: coverage totale ≥90% (alzato in A5, poi a 90%). Nuovi moduli devono includere unit test con mock; gli errori frequenti di questa stessa sezione sono coperti da `tests/python/test_agents_errors.py` come regression test — non rimuoverli senza aggiornare la voce in diff --git a/README.md b/README.md index f14ff5c..5d3f866 100644 --- a/README.md +++ b/README.md @@ -232,10 +232,10 @@ to the Python kebab-case CLI and propagate the exit code. ```powershell .\.venv\Scripts\python.exe -m ruff check src tests\python .\.venv\Scripts\python.exe -m mypy --strict src -.\.venv\Scripts\python.exe -m pytest tests\python -q --cov=ci_orchestrator --cov-fail-under=80 +.\.venv\Scripts\python.exe -m pytest tests\python -q --cov=ci_orchestrator --cov-fail-under=90 ``` -Coverage gate is **80%** as of Phase A5. Regression tests for the +Coverage gate is **90%**. Regression tests for the `AGENTS.md` "Errori frequenti da evitare" #9–#12 live in [tests/python/test_agents_errors.py](tests/python/test_agents_errors.py) and must stay green. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 0135439..fefebb7 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -312,10 +312,10 @@ Enforced by `gitea/workflows/lint.yml` job `python`: ```powershell python -m ruff check src tests\python python -m mypy --strict src -python -m pytest tests\python -q --cov=ci_orchestrator --cov-fail-under=80 +python -m pytest tests\python -q --cov=ci_orchestrator --cov-fail-under=90 ``` -Coverage gate is **80%** as of Phase A5. Regression tests for +Coverage gate is **90%**. Regression tests for `AGENTS.md` errors #9–#12 live in [tests/python/test_agents_errors.py](../tests/python/test_agents_errors.py).