Fix: Revert release.yaml Python build to TOX
[releng/lftools.git] / tox.ini
diff --git a/tox.ini b/tox.ini
index b7a9a88..a68b732 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -12,11 +12,22 @@ ignore_basepython_conflict = true
 
 [pytest]
 markers = datafiles
-addopts = -p no:warnings
+addopts =
+    -p no:warnings
+    --cov=lftools
+    --cov-report=term-missing
 
 [testenv]
 basepython = python3
-deps = -r{toxinidir}/requirements-test.txt
+# This needs to mirror the test section of pyproject.toml
+deps =
+    pytest==8.3.5
+    pytest-click==1.1.0
+    pytest-cov==5.0.0
+    pytest-datafiles==3.0.0
+    pytest-mock==3.14.0
+    pytest-responses==0.5.1
+
 commands = pytest
 usedevelop = true
 
@@ -42,37 +53,47 @@ commands =
 
 [testenv:docs]
 description = Build the documentation with sphinx
-basepython = python3
-deps = -rrequirements-docs.txt
+basepython = python3.8
+# This needs to mirror the docs section of pyproject.toml plus the testenv
+deps =
+    {[testenv]deps}
+    lfdocs-conf
+    reno
+    sphinxcontrib-programoutput
+
 extras = openstack
 commands = sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
 
 [testenv:docs-linkcheck]
 description = Check the documentation links with sphinx
-basepython = python3
-deps = -rrequirements-docs.txt
+basepython = python3.8
+deps =
+    {[testenv:docs]deps}
 extras = openstack
 commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
 
 [testenv:latest-upstream]
 description = Latest upstream test. Used for what exactly?
 basepython = python3
-deps = -r{toxinidir}/requirements-test.txt
+deps =
+    {[testenv:docs]deps}
 commands =
     pip install -U python-jenkins requests
     pytest
 
 [testenv:license]
 description = Check all files for license header
-basepython = python3
-deps = lftools
+basepython = python3.8
+deps =
+    setuptools
+    lftools
 commands =
     lftools license check-dir lftools
     lftools license check-dir -r '.+' shell
 
 [testenv:pre-commit]
 description = Precommit checks for black, gitlint, etc.
-basepython = python3.7
+basepython = python3.8
 allowlist_externals =
     /bin/sh
 deps =