Skip to content

Commit 8831c1d

Browse files
authored
chore(coverage): declare the gate in [tool.coverage.report] and measure only in test-ci (#124)
1 parent 10775df commit 8831c1d

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎.github/workflows/_checks.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ jobs:
4444
- run: uv python install ${{ matrix.python-version }}
4545
- run: uv python pin ${{ matrix.python-version }}
4646
- run: just install
47-
- run: just test --cov-report xml
48-
47+
- run: just test-ci
4948
pytest-freethreaded:
5049
runs-on: ubuntu-latest
5150
steps:
@@ -59,8 +58,7 @@ jobs:
5958
- run: uv python pin 3.14t
6059
- run: just install
6160
- run: uv run --no-sync python -c "import sys; assert not sys._is_gil_enabled(), 'GIL is enabled'"
62-
- run: just test --cov-report xml
63-
61+
- run: just test-ci
6462
links:
6563
runs-on: ubuntu-latest
6664
steps:

‎justfile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ lint-ci:
1919
test *args:
2020
uv run --no-sync pytest {{ args }}
2121

22+
test-ci:
23+
uv run --no-sync pytest --cov=. --cov-report term-missing --cov-report xml
24+
2225
test-branch:
23-
@just test --cov-branch
26+
@just test --cov=. --cov-branch
2427

2528
# Auth via PyPI Trusted Publishing (OIDC); uv publish auto-detects the CI id-token.
2629
publish:

‎pyproject.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ isort.no-lines-before = ["standard-library", "local-folder"]
9999
"tests/**" = ["S101"]
100100

101101
[tool.pytest.ini_options]
102-
addopts = "--cov=. --cov-report term-missing --cov-fail-under=100"
102+
addopts = ""
103103
asyncio_mode = "auto"
104104
pythonpath = ["src"]
105105
asyncio_default_fixture_loop_scope = "function"
@@ -111,3 +111,4 @@ markers = [
111111
run.concurrency = ["thread"]
112112
run.omit = ["benchmarks/*"]
113113
report.exclude_also = ["if typing.TYPE_CHECKING:", 'pytest\.fail\(']
114+
report.fail_under = 100

0 commit comments

Comments
 (0)