From 6b7e2407715877538a3b400df0dacdb8b4f0f9a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Fri, 9 Jan 2026 14:20:04 +0100 Subject: [PATCH] misc: Introduce Makefile as a task runner tool Allow for easier changes in our tooling and also to discover the tooling more easily. --- .github/workflows/ci-python.yml | 4 ++-- Makefile | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 Makefile diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index a2a7431..7176588 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -20,8 +20,8 @@ jobs: uses: greenbone/workflows/.github/workflows/lint-python.yml@main with: lint-packages: "greenbone tests" - linter: ruff check - formatter: ruff format --diff + linter: make lint + formatter: make format python-version: ${{ matrix.python-version }} test: diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..40d2aad --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +.PHONY: lint format test coverage fix + +RUN = poetry run + +lint: + $(RUN) ruff check + +format: + $(RUN) ruff format --diff + +test: + $(RUN) python -m unittest + +coverage: + $(RUN) coverage run -m unittest + $(RUN) coverage report -m + $(RUN) coverage html + +fix: + $(RUN) ruff format + $(RUN) ruff check --fix