Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox: minor tox configuration updates #116

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ envlist = formatting, {py3,py39}-mypy, py3, py39, schemacheck, py3-sys
isolated_build = True

[testenv]
description = Run unit tests
passenv =
WRITABLE_PASSWD
NSS_WRAPPER_PASSWD
Expand All @@ -17,6 +18,7 @@ commands =
py.test -v --cov=sambacc --cov-report=html {posargs:tests}

[testenv:{py3,py39}-mypy]
description = Run mypy static checker tool
deps =
mypy
types-setuptools
Expand All @@ -28,6 +30,7 @@ commands =
mypy sambacc tests

[testenv:py3-sys]
description = Run unit tests with system packages to validate Samba integration
# py3-sys -- more like sisyphus, am I right?
#
# In order to run tests that rely on "system level" packages (samba,
Expand All @@ -48,6 +51,7 @@ allowlist_externals =
/usr/bin/py.test

[testenv:formatting]
description = Check the formatting for the source files
deps =
flake8
black>=23, <24
Expand All @@ -56,21 +60,15 @@ commands =
black --check -v .

[testenv:schemacheck]
description = Check the JSON Schema files are valid
deps =
black>=23, <24
PyYAML
commands =
python -m sambacc.schema.tool
# The following env var is a workaround for running this testenv on fedora 39
# with python 3.12.1. As of approx. 2023-12-11 the ci started # to fail because
# of the multidict library (not even one of our direct dependencies) failing
# to install from source because we (intentionally) have no C compiler in the
# image. Try to remove this in a few weeks to see if wheel availability or
# whatever has been resolved.
setenv =
MULTIDICT_NO_EXTENSIONS=1

[testenv:schemaupdate]
description = Regenerate source files from JSON Schema file(s)
deps =
black>=23, <24
PyYAML
Expand All @@ -80,6 +78,7 @@ commands =
# this gitlint rule is not run by default.
# Run it manually with: tox -e gitlint
[testenv:gitlint]
description = Check the formatting of Git commit messages
deps =
gitlint==0.19.1
commands =
Expand Down
Loading