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