Commit d7235c74 authored by John L. Villalovos's avatar John L. Villalovos Committed by Nejc Habjan
Browse files

chore: add tox `labels` to enable running groups of environments

tox now has a feature of `labels` which allows running groups of
environments using the command `tox -m LABEL_NAME`. For example
`tox -m lint` which has been setup to run the linters.

Bumped the minimum required version of tox to be 4.0, which was
released over a year ago.
parent 679ddc75
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -81,6 +81,17 @@ You need to install ``tox`` (``pip3 install tox``) to run tests and lint checks
   # List all available tox environments
   tox list

   # "label" based tests. These use the '-m' flag to tox

   # run all the linter checks:
   tox -m lint

   # run only the unit tests:
   tox -m unit

   # run the functional tests. This is very time consuming:
   tox -m func

Running integration tests
-------------------------

+11 −2
Original line number Diff line number Diff line
[tox]
minversion = 1.6
minversion = 4.0
skipsdist = True
skip_missing_interpreters = True
envlist = py313,py312,py311,py310,py39,py38,flake8,black,twine-check,mypy,isort,cz,pylint
envlist = py313,py312,py311,py310,py39,py38,black,isort,flake8,mypy,twine-check,cz,pylint

# NOTE(jlvillal): To use a label use the `-m` flag.
# For example to run the `func` label group of environments do:
#   tox -m func
labels =
    lint = black,isort,flake8,mypy,pylint,cz
    unit = py313,py312,py311,py310,py39,py38
# func is the functional tests. This is very time consuming.
    func = cli_func_v4,api_func_v4

[testenv]
passenv =