Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we test coverage uploading #246

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: ./.github/workflows/tox.yml
with:
default_python: "3.10"
jobs_producing_coverage: 0
jobs_producing_coverage: 6
max_python: "3.13"
min_python: "3.10"
run_post: echo 'Running post'
Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[tool.coverage.report]
exclude_also = ["pragma: no cover", "if TYPE_CHECKING:"]
show_missing = true
skip_empty = true

[tool.coverage.run]
concurrency = ["multiprocessing", "thread"]
# Do not use branch until bug is fixes:
# https://github.com/nedbat/coveragepy/issues/605
# branch = true
parallel = true
source = ["test"]
2 changes: 2 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ cairosvg
markdown-include
mkdocs-ansible
mkdocs-exclude
coverage>=7.6.7
pytest>=8
Empty file added src/devtools/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions test/test_one.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Test module for the package."""


def test_placeholder():
"""Placeholder test."""
21 changes: 17 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
[tox]
minversion = 4.0
minversion = 4.6.3
envlist =
lint
docs
ubi8
ubi9
isolated_build = True
requires =
tox>=4.21.2
tox-uv>=1.15.0
tox>=4.21.2
tox-uv >= 1.16.0

[testenv]
commands =
skip_install = true
coverage run -m pytest {posargs:\
-n auto \
-ra \
--showlocals \
--doctest-modules \
--durations=10 \
}
{py,py310,py311,py312,py313}: sh -c "coverage combine -a -q --data-file={envdir}/.coverage {toxworkdir}/*/.coverage.* && coverage xml --data-file={envdir}/.coverage -o {envdir}/coverage.xml --fail-under=0"
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}}
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
skip_install = false
usedevelop = false
changedir = {toxinidir}
allowlist_externals =
sh

[testenv:docs]
description = Build docs
Expand Down
Loading