From 327867dbda2bdadf8be7aec239f3bc4e65643bad Mon Sep 17 00:00:00 2001 From: Kirill Sosnovskikh Date: Thu, 8 Aug 2024 10:15:51 +0300 Subject: [PATCH] [#293] Integrate allure-validator into pre-commit hook Signed-off-by: Kirill Sosnovskikh --- .pre-commit-config.yaml | 9 +++++++++ Makefile | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 032a87d7..7032f70a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,15 @@ repos: hooks: - id: isort name: isort (python) + - repo: local + hooks: + - id: allure-validator + name: allure-validator + entry: allure-validator + language: system + args: ["pytest_tests/"] + pass_filenames: false + types: [python] ci: autofix_prs: false diff --git a/Makefile b/Makefile index 748ec353..a4402c3b 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ ${VENV_DIR}: requirements: @echo Isntalling pip requirements ${FROM_VENV} pip install -e ../frostfs-testlib + ${FROM_VENV} pip install -e ../allure-validator ${FROM_VENV} pip install -Ur requirements.txt ${FROM_VENV} pip install -Ur requirements_dev.txt @@ -36,7 +37,9 @@ requirements: #### VALIDATION SECTION #### lint: create requirements ${FROM_VENV} pip install -e ../frostfs-testlib; + ${FROM_VENV} pip install -e ../allure-validator ${FROM_VENV} pylint --disable R,C,W pytest_tests validation: lint - ${FROM_VENV} pytest --collect-only \ No newline at end of file + ${FROM_VENV} pytest --collect-only + ${FROM_VENV} allure-validator "pytest_tests/" \ No newline at end of file