-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
57 lines (52 loc) · 1.8 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
[tox]
envlist =
lint,
docs,
build,
py37,
py38,
py39,
py310,
py311,
[testenv]
parallel_show_output=true
setenv =
PYTHONPATH={toxinidir}/tests
PYTHONUNBUFFERED=yes
# Compatible with "tox --parallel" to avoid concurrency
COVERAGE_FILE={toxinidir}/.coverage.{envname}
COVERAGE_CONTEXT={envname}
passenv =
*
deps = -r{toxinidir}/test-requirements.txt
usedevelop = true
commands =
pytest --cov-append -s --cov --cov-report=term-missing --cov-report=html --cov-context=test -vv {posargs:}
[testenv:lint]
# skip_install = true
basepython = {env:TOXPYTHON:python3.11}
commands =
pre-commit-vauxoo
[testenv:docs]
usedevelop = true
deps =
-r{toxinidir}/docs/requirements.txt
commands =
sphinx-build {posargs:-E} -b doctest docs dist/docs
sphinx-build {posargs:-E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs
[testenv:build]
commands =
python -m build --sdist --wheel --outdir dist_wo_pbr/
python -c "import shutil;shutil.rmtree('dist/', ignore_errors=True)"
python -m build --no-isolation --sdist --wheel --outdir dist/ # Generate ChangeLog with pbr
python -m twine check --strict dist/*
bump2version patch --allow-dirty --no-commit --no-tag --dry-run --verbose
# Install packages from binaries to test if all files were already included in the compressed file
python -c '''import sys,pip,os,glob;os.chdir("dist");sys.argv = ["", "install", "-U", "--force-reinstall", glob.glob("*.tar.gz")[-1], "--use-feature=no-binary-enable-wheel-cache"];pip.main()'''
# Testing the package is importing the dependencies well
python -c '''from pre_commit_vauxoo.cli import main;import os, sys;os.chdir("dist");sys.argv=["", "--version"];main()'''
[testenv:clean]
commands = coverage erase
skip_install = true
deps = coverage