Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .husky/hooks/test-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ fi

# Run tests
echo " - Running tests..."
if pytest --html=tests/test-report/test-report.html; then
# HTML report only when pytest-html is installed (it is optional)
HTML_ARGS=""
if python -c "import pytest_html" 2>/dev/null; then
HTML_ARGS="--html=tests/test-report/test-report.html"
fi
if pytest $HTML_ARGS; then
echo " ✅ All tests passed"
else
echo " ❌ Tests failed. Please fix before pushing."
Expand Down
7 changes: 6 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ fi

# Run tests to ensure code quality
echo "🧪 Running tests..."
if ! pytest --html=tests/test-report/test-report.html; then
# HTML report only when pytest-html is installed (it is optional)
HTML_ARGS=""
if python -c "import pytest_html" 2>/dev/null; then
HTML_ARGS="--html=tests/test-report/test-report.html"
fi
if ! pytest $HTML_ARGS; then
echo "❌ Tests failed. Please fix before pushing."
exit 1
fi
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ lxml~=6.1.0
ruff==0.11.5
pytest>=7.0.0
pytest-cov>=4.0.0
pytest-html>=4.2.0
black>=26.3.1
flake8>=6.0.0
isort>=5.0.0
Loading