-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
48 lines (41 loc) · 1.33 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
; SPDX-FileCopyrightText: 2023 Software Freedom Conservancy <[email protected]>
;
; SPDX-License-Identifier: GPL-2.0-or-later
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. Installation:
# pip install -r requirements-dev.txt
# and then run "tox" from this directory.
[tox]
skipsdist = True
envlist = py{38,39,310,311,312}-normal, ruff, types, reuse
[testenv]
# for using poetry and tox
# see https://python-poetry.org/docs/faq/#is-tox-supported
# see https://github.com/python-poetry/poetry/issues/1745
whitelist_externals =
poetry
# see https://pypi.org/project/tox-run-before/
run_before =
poetry export --with=dev --without-hashes --output={toxinidir}/requirements.txt
deps =
-r {toxinidir}/requirements.txt
commands =
pytest {posargs}
setenv = COVERAGE_FILE=.coverage-{env:TOX_ENV_NAME}
[testenv:codestyle]
deps = ruff
skip_install = True
commands =
ruff format --check --diff
ruff check --diff
[testenv:types]
# use mypy on lowest version to make sure that all problems are caught
basepython = python3.10
deps = mypy
skip_install = True
commands = mypy inkvn --ignore-missing-imports --check-untyped-defs
[testenv:reuse]
deps = reuse >= 4.0.0
skip_install = True
commands = reuse lint