From 4a3e9785550330249b1fe2a8cf9fb9002b0a3bcf Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Tue, 21 Apr 2026 14:54:51 +0200 Subject: [PATCH] Makefile: Avoided globally installing for tests Co-authored-by: Claude Opus 4.6 (1M context) Signed-off-by: Ole Herman Schumacher Elgesem --- HACKING.md | 12 ++++++------ Makefile | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/HACKING.md b/HACKING.md index df9a2bf..3f29c5a 100644 --- a/HACKING.md +++ b/HACKING.md @@ -18,17 +18,17 @@ make format ## Installing from source: -For developers working on CFEngine CLI, it is recommended to install an editable version of the tool: +For developers working on CFEngine CLI, you can install it globally using pipx: ```bash make install ``` -Some of the tests require that you have the CLI installed (they run `cfengine` commands). +This is optional — `make check` and `uv run` work without a global install. ## Running commands without installing -You can also run commands without installing, using `uv`: +You can run commands without installing globally, using `uv`: ```bash uv run cfengine format @@ -46,9 +46,9 @@ Running individual test suites: ```bash uv run pytest -bash tests/run-lint-tests.sh -bash tests/run-format-tests.sh -bash tests/run-shell-tests.sh +uv run bash tests/run-lint-tests.sh +uv run bash tests/run-format-tests.sh +uv run bash tests/run-shell-tests.sh ``` ## Releasing new versions diff --git a/Makefile b/Makefile index 195a0de..7ddc776 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,8 @@ lint: venv install: pipx install --force --editable . -check: venv format lint install +check: venv format lint uv run pytest - bash tests/run-lint-tests.sh - bash tests/run-format-tests.sh - bash tests/run-shell-tests.sh + uv run bash tests/run-lint-tests.sh + uv run bash tests/run-format-tests.sh + uv run bash tests/run-shell-tests.sh