mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-08 05:43:53 +00:00

Add tox to automate testing across multiple environments, ensuring code robustness and compatibility with different Python versions. This helps ensure consistency in test environments so both development and CI systems run tests uniformly, and simplifies the execution of tasks like linting and other commands with a single command. Change-Id: I522adb486e89abecb9a130941ce4cef31332193a Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
26 lines
567 B
INI
26 lines
567 B
INI
[tox]
|
|
envlist = py38, py39, py310, py311, py312, lint
|
|
|
|
[testenv]
|
|
allowlist_externals = poetry
|
|
commands =
|
|
poetry install -v --with dev
|
|
poetry run pytest
|
|
|
|
[testenv:format]
|
|
description = Run linters and type checks
|
|
skip_install = true
|
|
allowlist_externals = poetry
|
|
commands =
|
|
poetry run black .
|
|
poetry run isort .
|
|
|
|
[testenv:lint]
|
|
description = Run linters and type checks
|
|
skip_install = true
|
|
allowlist_externals = poetry
|
|
commands =
|
|
poetry run black --check .
|
|
poetry run isort --check-only .
|
|
poetry run mypy .
|
|
poetry run darglint tlc tests
|