Use pytest in the Makefile
This commit is contained in:
parent
78e2b726fb
commit
e8edac5287
14
Makefile
14
Makefile
@ -2,6 +2,7 @@
|
||||
|
||||
PYTHON_VERSION = 3.11
|
||||
VENV_DIR = .venv
|
||||
PYTHON = $(VENV_DIR)/bin/python
|
||||
|
||||
# Default target
|
||||
.PHONY: all
|
||||
@ -39,6 +40,14 @@ ensure-ruff:
|
||||
uv tool install ruff; \
|
||||
fi
|
||||
|
||||
# ensure pytest is available
|
||||
.PHONY: ensure-pytest
|
||||
ensure-pytest:
|
||||
@if ! $(PYTHON) -c "import pytest" 2>/dev/null; then \
|
||||
echo "pytest required for testing. Installing pytest..."; \
|
||||
uv pip install pytest; \
|
||||
fi
|
||||
|
||||
# Create virtual environment with uv
|
||||
.PHONY: venv-init
|
||||
venv-init: expect-arm64 expect-uv
|
||||
@ -81,10 +90,9 @@ check: ensure-ruff
|
||||
|
||||
# Run tests
|
||||
.PHONY: test
|
||||
test:
|
||||
test: ensure-pytest
|
||||
# 🏗️ Running tests...
|
||||
# mock success stub for future test suite 😜
|
||||
@true
|
||||
$(PYTHON) -m pytest
|
||||
# ✅ Tests completed
|
||||
|
||||
# Clean up
|
||||
|
||||
Loading…
Reference in New Issue
Block a user