diff options
author | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2022-09-16 18:09:32 +0100 |
---|---|---|
committer | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2022-10-17 14:46:40 +0100 |
commit | 89c1f4bafb51dbbed705b6960810d90825318b13 (patch) | |
tree | 34b6f88a3342421d79ba6dea60e50ab28752c5d0 /tox.ini | |
parent | 3083f7ee68ce08147db08fca2474e5f4712fc8d7 (diff) | |
download | mlia-89c1f4bafb51dbbed705b6960810d90825318b13.tar.gz |
MLIA-646 Add environment to setup pre-commit hooks
- Add new environment 'lint_setup' to set up the pre-commit hooks used
by the environment 'lint' without running the actual tests.
- Add docker file for linting and testing to the project root.
- Add helper script 'install_python_versions.sh' for docker creation.
Change-Id: I5f264df72a72d7a118ab798eddcf0febd4e1125b
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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]). |