mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 06:41:43 +00:00
build: fix tox environment creation with the latest updates
This commit is contained in:
27
tox.ini
27
tox.ini
@ -1,6 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = check, tests
|
envlist = check, tests
|
||||||
isolated_build = True
|
isolated_build = true
|
||||||
labels =
|
labels =
|
||||||
release = version, docs, publish
|
release = version, docs, publish
|
||||||
dependencies = -e .[journald,pacman,s3,shell,stats,validator,web]
|
dependencies = -e .[journald,pacman,s3,shell,stats,validator,web]
|
||||||
@ -27,7 +27,9 @@ description = Run common checks like linter, mypy, etc
|
|||||||
deps =
|
deps =
|
||||||
{[tox]dependencies}
|
{[tox]dependencies}
|
||||||
-e .[check]
|
-e .[check]
|
||||||
|
pip_pre = true
|
||||||
setenv =
|
setenv =
|
||||||
|
CFLAGS="-Wno-unterminated-string-initialization"
|
||||||
MYPYPATH=src
|
MYPYPATH=src
|
||||||
commands =
|
commands =
|
||||||
autopep8 --exit-code --max-line-length 120 -aa -i -j 0 -r "src/{[tox]project_name}" "tests/{[tox]project_name}"
|
autopep8 --exit-code --max-line-length 120 -aa -i -j 0 -r "src/{[tox]project_name}" "tests/{[tox]project_name}"
|
||||||
@ -38,16 +40,16 @@ commands =
|
|||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
description = Generate source files for documentation
|
description = Generate source files for documentation
|
||||||
|
allowlist_externals =
|
||||||
|
bash
|
||||||
|
find
|
||||||
|
mv
|
||||||
|
changedir = src
|
||||||
depends =
|
depends =
|
||||||
version
|
version
|
||||||
deps =
|
deps =
|
||||||
{[tox]dependencies}
|
{[tox]dependencies}
|
||||||
-e .[docs]
|
-e .[docs]
|
||||||
changedir = src
|
|
||||||
allowlist_externals =
|
|
||||||
bash
|
|
||||||
find
|
|
||||||
mv
|
|
||||||
setenv =
|
setenv =
|
||||||
SPHINX_APIDOC_OPTIONS=members,no-undoc-members,show-inheritance
|
SPHINX_APIDOC_OPTIONS=members,no-undoc-members,show-inheritance
|
||||||
commands =
|
commands =
|
||||||
@ -65,16 +67,16 @@ description = Generate html documentation
|
|||||||
deps =
|
deps =
|
||||||
{[tox]dependencies}
|
{[tox]dependencies}
|
||||||
-e .[docs]
|
-e .[docs]
|
||||||
recreate = True
|
recreate = true
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -b html -a -j auto -W docs {envtmpdir}{/}html
|
sphinx-build -b html -a -j auto -W docs {envtmpdir}{/}html
|
||||||
|
|
||||||
[testenv:publish]
|
[testenv:publish]
|
||||||
description = Create and publish release to GitHub
|
description = Create and publish release to GitHub
|
||||||
depends =
|
|
||||||
docs
|
|
||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
git
|
git
|
||||||
|
depends =
|
||||||
|
docs
|
||||||
passenv =
|
passenv =
|
||||||
SSH_AUTH_SOCK
|
SSH_AUTH_SOCK
|
||||||
commands =
|
commands =
|
||||||
@ -89,15 +91,18 @@ description = Run tests
|
|||||||
deps =
|
deps =
|
||||||
{[tox]dependencies}
|
{[tox]dependencies}
|
||||||
-e .[tests]
|
-e .[tests]
|
||||||
|
pip_pre = true
|
||||||
|
setenv =
|
||||||
|
CFLAGS="-Wno-unterminated-string-initialization"
|
||||||
commands =
|
commands =
|
||||||
pytest {posargs}
|
pytest {posargs}
|
||||||
|
|
||||||
[testenv:version]
|
[testenv:version]
|
||||||
description = Bump package version
|
description = Bump package version
|
||||||
deps =
|
|
||||||
packaging
|
|
||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
sed
|
sed
|
||||||
|
deps =
|
||||||
|
packaging
|
||||||
commands =
|
commands =
|
||||||
# check if version is set and validate it
|
# check if version is set and validate it
|
||||||
{envpython} -c 'from packaging.version import Version; Version("{posargs}")'
|
{envpython} -c 'from packaging.version import Version; Version("{posargs}")'
|
||||||
|
Reference in New Issue
Block a user