From b00aefaf780b0a0e3b8e59c8abb57d9c2762c434 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Tue, 16 Jun 2026 20:13:49 +0200 Subject: [PATCH] chore: add tox lint, format and test environments --- tox.ini | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..917e98a --- /dev/null +++ b/tox.ini @@ -0,0 +1,47 @@ +[tox] +requires = + tox>=4.19 +env_list = + unit-py3{9-13} + smoke-py3{9-13} + lint + format + +[testenv] +deps = + ../posix-sdc + . + +[testenv:lint] +description = run type check on code base +labels = static +deps = + mypy +commands = + mypy src tests --junit-xml test-reports/{env_name}.xml + +[testenv:format] +description = check formatting +labels = static +deps = + autopep8 +commands = + autopep8 --diff --exit-code src tests + +[testenv:unit-py3{9-13}] +description = run unit tests +labels = unit +deps = + {[testenv]deps} + pytest +commands = + pytest tests/unit --junitxml=test-reports/{env_name}.xml + +[testenv:smoke-py3{9-13}] +description = run smoke tests against the console entry points +labels = smoke +deps = + {[testenv]deps} + pytest +commands = + pytest tests/smoke --junitxml=test-reports/{env_name}.xml