From 8cd94f0007a4c79cd699f4102debba49687b35a6 Mon Sep 17 00:00:00 2001 From: Maksym Zemlianyi Date: Mon, 2 Dec 2024 09:09:25 +0200 Subject: [PATCH] Minor updates and add coverage tests with make --- .github/workflows/python-test-check.yml | 8 ++------ Makefile | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-test-check.yml b/.github/workflows/python-test-check.yml index fdac78f..9b24084 100644 --- a/.github/workflows/python-test-check.yml +++ b/.github/workflows/python-test-check.yml @@ -18,11 +18,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt + make help - name: Github Action for testing the code - run: coverage run -m unittest discover - - - name: Github Action to retrieve coverage percentage - id: total-coverage - run: coverage report --fail-under=75 + run: make coverage diff --git a/Makefile b/Makefile index ca38ee3..753d387 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,12 @@ lint: # Lint the codebase poetry run flake8 --max-line-length=120 --ignore=E731 @echo "======= Code linting completed successfully. =======\n" +coverage: # Check coverage the codebase + @echo "======= Running coverage for code... =======" + coverage run --omit="*/__init__.py,*/tests/*" -m unittest discover -s tests + coverage report --fail-under=75 + @echo "======= Code coverage completed successfully. =======\n" + patch: # Increment package version @echo "Patching package version..." poetry version patch