From b02f5b91f04b1ce724a3aff2a3386bbdd9bf4f13 Mon Sep 17 00:00:00 2001 From: falibabaei <66964597+falibabaei@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:25:45 +0100 Subject: [PATCH] install git during exexuting the tox --- tox.ini | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tox.ini b/tox.ini index 152c8163..713ee796 100644 --- a/tox.ini +++ b/tox.ini @@ -3,11 +3,52 @@ minversion = 3.25.0 isolated_build = True envlist = qc.sty,qc.cov,qc.sec,py39 +[testenv] +install_command = pip install -U {opts} {packages} +commands = pytest --numprocesses=auto {posargs} +[tox] +minversion = 3.25.0 +isolated_build = True +envlist = qc.sty,qc.cov,qc.sec,py39 + [testenv] install_command = pip install -U {opts} {packages} commands = pytest --numprocesses=auto {posargs} allowlist_externals = mkdir + git + apt-get +commands_pre = + apt-get update && apt-get install -y git +passenv = + RCLONERCLONE_CONFIG_RSHARE_VENDOR + RCLONE_CONFIG + RCLONE_CONFIG_RSHARE_PASS + RCLONE_CONFIG_RSHARE_URL + RCLONE_CONFIG_RSHARE_TYPE + RCLONE_CONFIG_RSHARE_USER +setenv = + OS_TEST_TIMEOUT=240 +deps = -r{toxinidir}/requirements-test.txt + git+https://github.com/m-team-kit/uSplit.git@main + + + + +[testenv:qc.sty] +commands = + flake8 --statistics --tee --output-file={toxinidir}/flake8.log \ + --format=pylint ai4life api data tests + +[testenv:qc.cov] +commands = + pytest --cov=api --cov=ai4life --cov-report=html:{toxinidir}/htmlcov --cov-report=term-missing tests + +[testenv:qc.sec] +commands = + mkdir -p {toxinidir}/bandit + bandit -r ai4life api -x tests -o {toxinidir}/bandit/index.html + passenv = RCLONERCLONE_CONFIG_RSHARE_VENDOR RCLONE_CONFIG