forked from leanEthereum/leanSpec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
75 lines (62 loc) · 2.14 KB
/
tox.ini
File metadata and controls
75 lines (62 loc) · 2.14 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
[tox]
min_version = 4.0
requires =
tox >=4.32.0,<5
tox-uv >=1.29
env_list =
# defines what runs when `uvx tox` is executed with no `-e` argument
all-checks
pytest
docs-build
[testenv]
uv_python = >=3.12
package = editable
runner = uv-venv-lock-runner
[testenv:all-checks]
description = Run all quality checks (lint, typecheck, spellcheck, mdformat)
commands =
{[testenv:lint]commands}
{[testenv:typecheck]commands}
{[testenv:spellcheck]commands}
{[testenv:mdformat]commands}
[testenv:lint]
description = Lint and code formatting checks (ruff)
commands =
ruff check --no-fix --show-fixes
ruff format --check
[testenv:fix]
description = Auto-fix linting and formatting issues (ruff)
commands =
ruff check --fix
ruff format
[testenv:typecheck]
description = Run type checking (ty)
commands = ty check
[testenv:spellcheck]
description = Run spell checking (codespell)
commands = codespell src tests packages docs README.md CLAUDE.md --skip="*.lock,*.svg,.git,__pycache__,.pytest_cache,tests/lean_spec/snappy/testdata" --ignore-words=.codespell-ignore-words.txt
[testenv:mdformat]
description = Check markdown formatting for docs (mdformat)
commands = mdformat docs/
[testenv:fill]
description = Generate consensus layer test fixtures
commands = fill --fork=Devnet --clean -n auto {posargs}
[testenv:pytest]
description = Run tests (pytest)
# parallelize with `auto` but keep max processes reasonable for CI
commands = pytest {posargs} tests -n auto --maxprocesses=10 --durations=10 --dist=worksteal
[testenv:pytest-cov]
description = Run tests with coverage (pytest)
commands = pytest --cov --cov-report=html --cov-report=term {posargs}
[testenv:pytest-consensus]
description = Run consensus tests (pytest)
commands = pytest {posargs} -n auto --maxprocesses=10 --durations=10 --dist=worksteal \
tests/lean_spec/subspecs/containers \
tests/lean_spec/subspecs/forkchoice \
tests/lean_spec/subspecs/networking
[testenv:docs-build]
description = Build documentation (mkdocs)
commands = mkdocs build {posargs}
[testenv:docs-serve]
description = Serve documentation locally (mkdocs)
commands = mkdocs serve {posargs}