diff --git a/Makefile b/Makefile index f6b279601..c14775787 100644 --- a/Makefile +++ b/Makefile @@ -432,7 +432,7 @@ clean: ## --- Automated checks -------------------------------------------------------- smoketest: @echo "๐Ÿš€ Running smoketest..." - @bash -c '\ + @/bin/bash -c 'source $(VENV_DIR)/bin/activate && \ ./smoketest.py --verbose || { echo "โŒ Smoketest failed!"; exit 1; }; \ echo "โœ… Smoketest passed!" \ ' @@ -443,7 +443,7 @@ test: @/bin/bash -c "source $(VENV_DIR)/bin/activate && \ export DATABASE_URL='sqlite:///:memory:' && \ export TEST_DATABASE_URL='sqlite:///:memory:' && \ - uv run pytest -n auto --maxfail=0 -v --ignore=tests/fuzz" + uv run --active pytest -n auto --maxfail=0 -v --ignore=tests/fuzz" test-profile: @echo "๐Ÿงช Running tests with profiling (showing slowest tests)..." @@ -451,7 +451,7 @@ test-profile: @/bin/bash -c "source $(VENV_DIR)/bin/activate && \ export DATABASE_URL='sqlite:///:memory:' && \ export TEST_DATABASE_URL='sqlite:///:memory:' && \ - uv run pytest -n auto --durations=20 --durations-min=1.0 --disable-warnings -v --ignore=tests/fuzz" + uv run --active pytest -n auto --durations=20 --durations-min=1.0 --disable-warnings -v --ignore=tests/fuzz" coverage: @test -d "$(VENV_DIR)" || $(MAKE) venv @@ -1027,7 +1027,9 @@ flake8: ## ๐Ÿ flake8 checks pylint: uv ## ๐Ÿ› pylint checks @echo "๐Ÿ› pylint $(TARGET) (parallel)..." - uv run pylint -j 0 --fail-on E --fail-under 10 $(TARGET) + @test -d "$(VENV_DIR)" || $(MAKE) venv + @/bin/bash -c "source $(VENV_DIR)/bin/activate && \ + uv run --active pylint -j 0 --fail-on E --fail-under 10 $(TARGET)" markdownlint: ## ๐Ÿ“– Markdown linting @# Install markdownlint-cli2 if not present @@ -1073,7 +1075,9 @@ pycodestyle: ## ๐Ÿ“ Simple PEP-8 checker pre-commit: uv ## ๐Ÿช„ Run pre-commit tool @echo "๐Ÿช„ Running pre-commit hooks..." - uv run pre-commit run --config .pre-commit-lite.yaml --all-files --show-diff-on-failure + @test -d "$(VENV_DIR)" || $(MAKE) venv + @/bin/bash -c "source $(VENV_DIR)/bin/activate && \ + uv run --active pre-commit run --config .pre-commit-lite.yaml --all-files --show-diff-on-failure" ruff: ## โšก Ruff lint + (eventually) format @echo "โšก ruff $(TARGET)..." && $(VENV_DIR)/bin/ruff check $(TARGET)