aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Skultety <eskultet@redhat.com>2023-03-24 16:34:28 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2023-04-28 10:05:23 +0000
commitf749956f3bd6d7aa15ae49a37706d0d27fdeb63a (patch)
tree53a2bb5a1e5c9803c6cc7c167884aa1a9e739d7e
parent073c7beb53d1174fec9620433adacee850ddd3ed (diff)
downloadlibvirt-ci-f749956f3bd6d7aa15ae49a37706d0d27fdeb63a.zip
libvirt-ci-f749956f3bd6d7aa15ae49a37706d0d27fdeb63a.tar.gz
libvirt-ci-f749956f3bd6d7aa15ae49a37706d0d27fdeb63a.tar.bz2
Add tox.ini configuration file
This defines 3 test environments: 1) flake8 linter 2) one for python 3.8 as that's our base 3) one for python 3.11 (or whatever is the newest version) to check for future deprecation warnings It also instructs tox to always build wheels out of our package instead of sdists. This is beneficial as tox's virtual environments are re-used in between runs, so with no code changes, the same wheel will be used and installed. Signed-off-by: Erik Skultety <eskultet@redhat.com>
-rw-r--r--tox.ini20
1 files changed, 20 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..cff5ee5
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,20 @@
+[tox]
+isolated_build = True
+envlist = py3{8,11}, lint
+
+[testenv]
+package = wheel
+wheel_build_env = .pkg
+
+[testenv:py3{8,11}]
+description = Run pytest
+deps = pytest
+ ansible
+ ansible-runner
+ -rrequirements.txt
+commands = pytest
+
+[testenv:lint]
+description = Run linter
+deps = flake8
+commands = flake8 --format=pylint lcitool