From 864ffdfbf8541e1b70b55df4add980cdfc88319c Mon Sep 17 00:00:00 2001 From: Bohdan Bobrowski Date: Tue, 17 Dec 2024 20:50:13 +0100 Subject: [PATCH] build scripts refactor --- .github/workflows/code_check.yml | 9 ++++----- .github/workflows/tests.yml | 5 ++--- Makefile | 16 ++++++++-------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/code_check.yml b/.github/workflows/code_check.yml index 3d6b1cf..53fa0ae 100644 --- a/.github/workflows/code_check.yml +++ b/.github/workflows/code_check.yml @@ -16,12 +16,11 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install poetry - poetry install --with=dev + pip install '.[dev]' - name: Run Ruff linter and code formatter run: | - poetry run ruff format . --check - poetry run ruff check . + ruff format . --check + ruff check . - name: Static code analysys with mypy run: | - poetry run mypy . + mypy . diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 76babaa..63a1d99 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,8 +16,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install poetry - poetry install --with=dev + pip install '.[dev]' - name: Unit tests run: | - poetry run pytest ./tests/unit + pytest ./tests/unit diff --git a/Makefile b/Makefile index 011853c..11b95ba 100644 --- a/Makefile +++ b/Makefile @@ -2,26 +2,26 @@ .PHONY: format, check, test, integration_test, unit_test, unit_coverage, unit_coverage_html, clear_win format: - poetry run ruff format . - poetry run ruff check . --fix + ruff format . + ruff check . --fix check: - poetry run mypy . + mypy . test: - poetry run pytest tests -s + pytest tests -s integration_test: - poetry run pytest tests/integration -s + pytest tests/integration -s unit_test: - poetry run pytest tests/unit -s + pytest tests/unit -s unit_coverage: - poetry run pytest --cov=blog2epub ./tests/unit + pytest --cov=blog2epub ./tests/unit unit_coverage_html: - poetry run pytest --cov=blog2epub --cov-report=html ./tests/unit + pytest --cov=blog2epub --cov-report=html ./tests/unit clear_win: del *.epub