aboutsummaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini9
1 files changed, 6 insertions, 3 deletions
diff --git a/tox.ini b/tox.ini
index b2f5cfc..d8b3c76 100644
--- a/tox.ini
+++ b/tox.ini
@@ -19,15 +19,18 @@ deps =
commands =
pytest --cov=mlia --cov-report term-missing --cov-fail-under=95 tests/
-[testenv:lint]
-description = Run the pre-commit hooks.
+[testenv:{lint,lint_setup}]
+description = Run and setup the pre-commit hooks.
+# Re-use the same env for both lint and lint_setup
+envdir={toxworkdir}/lint
usedevelop = True
extras =
dev
# Workaround to resolve an issue with markdownlint in a docker environment
passenv = HOME
commands =
- pre-commit run --all-files --hook-stage=push {posargs}
+ lint_setup: pre-commit install-hooks
+ lint: pre-commit run --all-files --hook-stage=push {posargs}
[testenv:build]
description = Build a wheel file (platform name as optional argument [manylinux2014_aarch64, manylinux2014_x86_64]).