-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
64 lines (57 loc) · 1.61 KB
/
tox.ini
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
# Generated by nens-meta.
# See https://nens-meta.readthedocs.io/en/latest/config-files.html for info.
# If you want this file to be left alone, add "nens_meta_leave_alone" in
# all caps somewhere in this file in a comment.
#
[tox]
# If locally you don't have all the various python versions: that's OK, we'll skip them.
skip_missing_interpreters = true
# We need 4.4.0 for constrain_package_deps.
min_version = 4.4.0
# envlist is what gets run by default if you just type "tox".
# The idea is that just running "tox" is equivalent to the checks that happen on github.
envlist =
lint
py310
py311
py312
coverage
[testenv]
description = Run the tests
use_develop = true
skip_install = false
constrain_package_deps = true
extras = test
commands = pytest --no-header --tb line
[testenv:lint]
description = Run formatters/linters for basic code sanity and neatness
skip_install = true
deps = pre-commit
commands = pre-commit run --all
[testenv:test]
description = Run the tests with the default python
[testenv:coverage]
description = Get a test coverage report
use_develop = true
skip_install = false
constrain_package_deps = true
allowlist_externals = sh
deps = coverage
extras = test
commands =
coverage run -m pytest --no-header --tb line
coverage xml
coverage html
- sh -c 'coverage report --format markdown > for_step_summary.md'
coverage report --fail-under 50 --format text
[testenv:build_package]
description = Build and check python package
skip_install = true
deps =
twine
build
wheel
commands =
python -m build
twine check dist/*
### Extra lines below are preserved ###