forked from beeware/briefcase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
103 lines (96 loc) · 3.89 KB
/
tox.ini
File metadata and controls
103 lines (96 loc) · 3.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[tox]
envlist = towncrier-check,docs-lint,pre-commit,py{310,311,312,313,314}-cov,coverage-platform,py{310,311,312,313,314}-debugger
labels =
test = py-cov,coverage
test310 = py310-cov,coverage310
test311 = py311-cov,coverage311
test312 = py312-cov,coverage312
test313 = py313-cov,coverage313
test314 = py314-cov,coverage314
test-fast = py{310,311,312,313,314}-fast
test-platform = py{310,311,312,313,314}-cov,coverage-platform
skip_missing_interpreters = True
[testenv:pre-commit]
package = wheel
wheel_build_env = .pkg
dependency_groups = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure --color=always
[testenv:py{,310,311,312,313,314}{,-fast,-cov}]
package = wheel
wheel_build_env = .pkg
depends: pre-commit
use_develop = fast: True
# Needed on Windows to test data directory creation
passenv = LOCALAPPDATA
setenv = COVERAGE_FILE = {env:COVERAGE_FILE:.coverage}
dependency_groups = test
commands =
!fast-!cov : python -X warn_default_encoding -m pytest {posargs:-vv --color yes}
cov : python -X warn_default_encoding -m coverage run -m pytest {posargs:-vv --color yes}
fast : python -m pytest {posargs:-vv --color yes -n auto}
[testenv:coverage{,310,311,312,313,314}{,-ci}{,-platform,-platform-linux,-platform-macos,-platform-windows,-project}{,-keep}{,-html}]
package = wheel
wheel_build_env = .pkg
depends = pre-commit,py{,310,311,312,313,314}{,-cov}
# by default, coverage should run on oldest supported Python for testing platform coverage.
# however, coverage for a particular Python version should match the version used for pytest.
base_python =
coverage: py310,py311,py312,py313,py314
coverage310: py310
coverage311: py311
coverage312: py312
coverage313: py313
coverage314: py314
passenv = COVERAGE_FILE
setenv =
keep: COMBINE_FLAGS = --keep
# spoof platform for conditional coverage exclusions
platform-linux: COVERAGE_PLATFORM = linux
platform-macos: COVERAGE_PLATFORM = darwin
platform-windows: COVERAGE_PLATFORM = win32
# use the coverage files created in CI for individual platforms
ci-platform-linux: COVERAGE_FILE = .coverage.ubuntu
ci-platform-macos: COVERAGE_FILE = .coverage.macos
ci-platform-windows: COVERAGE_FILE = .coverage.windows
# disable conditional coverage exclusions for Python version to test entire platform
{platform,project}: COVERAGE_EXCLUDE_PYTHON_VERSION=disable
# disable conditional coverage exclusions for host platform to test entire project
project: COVERAGE_EXCLUDE_PLATFORM=disable
dependency_groups = test
commands_pre =
python --version
commands =
-python -m coverage combine {env:COMBINE_FLAGS}
html: python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=100
[testenv:py{,310,311,312,313,314}-debugger]
changedir = debugger
skip_install = True
deps =
build
commands =
uv pip install ".[pdb,debugpy]" --group test
python -X warn_default_encoding -m coverage run -m pytest {posargs:-vv --color yes}
python -m coverage combine
python -m coverage report --fail-under=100
[testenv:towncrier{,-check}]
skip_install = True
dependency_groups = towncrier
commands =
check : python -m towncrier.check --compare-with origin/main
!check : python -m towncrier {posargs}
[docs]
docs_dir = {tox_root}{/}docs{/}en
[testenv:docs{,-lint,-all,-live,-en}]
# Docs are always built on Python 3.12. See also the RTD config and contribution docs.
base_python = py312
package = wheel
wheel_build_env = .pkg
dependency_groups = docs
commands =
!lint-!all-!live-!en : build_md_translations {posargs} en
lint : pyspelling
lint : markdown-checker --dir {[docs]docs_dir} --func check_broken_urls --skip-domains=https://www.firegiant.com,https://flathub.org,https://wunjo.online,https://www.x.org
live : live_serve_en {posargs}
all : build_md_translations {posargs} en
en : build_md_translations {posargs} en