-
Notifications
You must be signed in to change notification settings - Fork 30
/
tox.ini
47 lines (41 loc) · 1.15 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
; SPDX-FileCopyrightText: Contributors to the Fedora Project
;
; SPDX-License-Identifier: MIT
[tox]
minversion = 3.10.0
envlist = py310,py311,py312,docs,black,lint
isolated_build = true
skip_missing_interpreters = true
[testenv]
passenv = HOME
skip_install = true
sitepackages = false
allowlist_externals =
poetry
commands_pre =
poetry install --all-extras
commands =
poetry run pytest -o 'addopts=--cov=fmn --cov-report term-missing --cov-report xml --cov-report html' --asyncio-mode auto tests/ {posargs}
[testenv:black]
commands =
poetry run black --diff --check fmn/ tests/ fmn-messages/fmn_messages/
[testenv:lint]
commands =
poetry run ruff check --diff fmn/ tests/ fmn-messages/fmn_messages/
poetry run reuse lint
[testenv:docs]
changedir = docs
allowlist_externals =
{[testenv]allowlist_externals}
mkdir
rm
commands=
mkdir -p _static
rm -rf _build
rm -rf _source
poetry run sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
# We use Ruff instead of flake8 but configure it appropriately so it doesn’t
# complain, e.g. if it’s run via a global hook.
[flake8]
max-line-length = 100
extend-ignore = E203