Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
74 lines (65 loc) · 1.71 KB
/
Copy pathtox.ini
File metadata and controls
74 lines (65 loc) · 1.71 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
[tox]
envlist = py310,
py314,
docs
minversion = 4.0
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = run the unit tests with pytest under {basepython}
setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv =
TOXENV
CI
TRAVIS
TRAVIS_*
APPVEYOR
APPVEYOR_*
CODECOV_*
commands = pytest {posargs: --cov-config="{toxinidir}/tox.ini" --cov pyminimp3} {toxinidir}
deps = -r requirements-dev.txt
[testenv:black]
description = Check formatting with black
skip_install = True
deps = black
commands = black --check src tests
[testenv:isort]
description = Check import sorting with isort
skip_install = True
deps = isort
commands = isort --check-only lib/minimp3.pyx src tests
[testenv:pyrefly]
description = Check types with pyrefly
skip_install = True
deps = pyrefly
commands = pyrefly check
[testenv:coverage]
description = combine coverage data and create reports
deps = coverage
skip_install = True
changedir = {toxworkdir}
setenv = COVERAGE_FILE=.coverage
commands = coverage erase
coverage combine
coverage report --rcfile={toxinidir}/tox.ini
coverage xml
[testenv:codecov]
description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)
deps = codecov
skip_install = True
commands = codecov --file {toxworkdir}/coverage.xml
[coverage:run]
source = src/pyminimp3
[coverage:report]
skip_covered = True
show_missing = True
[testenv:build]
description = Build and check the source and wheel distributions
basepython = python3.10
skip_install = True
deps =
build
twine
commands =
python -m build --sdist --wheel --outdir {envtmpdir}/dist {toxinidir}
twine check {envtmpdir}/dist/*