Skip to content

Commit

Permalink
chore: add tox labels to enable running groups of environments
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JohnVillalovos authored and nejch committed Feb 17, 2024
1 parent 679ddc7 commit d7235c7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
11 changes: 11 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------------------

Expand Down
13 changes: 11 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
[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 =
Expand Down

0 comments on commit d7235c7

Please sign in to comment.