From 99695325103107fb39fd94ec28a482727505aaac Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sun, 14 Jun 2026 11:25:53 +0300 Subject: [PATCH] ci: move coverage flags into a test-ci recipe (match modern-di) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coverage flags lived in pytest addopts, so every pytest run — including a targeted `just test path -k name` — tripped --cov-fail-under=100. Mirror the core modern-di repo: empty addopts, a dedicated `test-ci` recipe carrying the coverage flags, an explicit `test-branch`, and CI runs `just test-ci`. The 100%% gate is still enforced in CI; targeted local runs no longer trip it. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/_checks.yml | 2 +- Justfile | 5 ++++- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_checks.yml b/.github/workflows/_checks.yml index 88908af..3142d28 100644 --- a/.github/workflows/_checks.yml +++ b/.github/workflows/_checks.yml @@ -35,4 +35,4 @@ jobs: cache-dependency-glob: "**/pyproject.toml" - run: uv python install ${{ matrix.python-version }} - run: just install - - run: just test . --cov=. --cov-report xml + - run: just test-ci diff --git a/Justfile b/Justfile index 0853917..8ccbb3b 100644 --- a/Justfile +++ b/Justfile @@ -19,8 +19,11 @@ lint-ci: test *args: uv run --no-sync pytest {{ args }} +test-ci: + uv run --no-sync pytest --cov=. --cov-report term-missing --cov-report xml --cov-fail-under=100 + test-branch: - @just test --cov-branch + uv run --no-sync pytest --cov=. --cov-branch --cov-fail-under=100 publish: rm -rf dist diff --git a/pyproject.toml b/pyproject.toml index ad903b4..7894147 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ isort.lines-after-imports = 2 isort.no-lines-before = ["standard-library", "local-folder"] [tool.pytest.ini_options] -addopts = "--cov=. --cov-report term-missing --cov-fail-under=100" +addopts = "" [tool.coverage.report] exclude_also = [