From 174d2e7d046856146e1c128cfd161943861362d9 Mon Sep 17 00:00:00 2001 From: Adrian Lasota Date: Fri, 18 Jul 2025 11:39:33 +0200 Subject: [PATCH 1/3] ci: Added coveralls --- .github/workflows/build_upload_whl.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_upload_whl.yml b/.github/workflows/build_upload_whl.yml index 38fec87..e6696fd 100644 --- a/.github/workflows/build_upload_whl.yml +++ b/.github/workflows/build_upload_whl.yml @@ -163,6 +163,16 @@ jobs: source test_env/bin/activate mfd-unit-tests --project-dir ${{ github.workspace }}/${{ inputs.SOURCE_PATH }} + - name: Run unit tests with coverage if test directory exists + if: steps.test_check.outputs.run_unit_tests == 'true' + shell: bash + run: | + source test_env/bin/activate + mfd-unit-tests-with-coverage --project-dir ${{ github.workspace }}/${{ inputs.SOURCE_PATH }} + + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b #v2.3.6 + - name: Run functional tests if test directory exists if: steps.test_check.outputs.run_functional_tests == 'true' shell: bash @@ -202,4 +212,4 @@ jobs: version_after_bump: ${{ steps.VERSION_BUMP.outputs.version_after_bump }} run: | cd ${{ inputs.SOURCE_PATH }} - git push origin "${version_after_bump}" \ No newline at end of file + git push origin "${version_after_bump}" From 26821fa4b02bed7a2ea3d49f855ad6de7d34be32 Mon Sep 17 00:00:00 2001 From: Adrian Lasota Date: Fri, 18 Jul 2025 11:44:25 +0200 Subject: [PATCH 2/3] docs: Added coverage badge --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b1efbb5..08327ca 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ # MFD Connect **Module for running commands on remote machine.** +[![Coverage Status](https://coveralls.io/repos/github/intel/mfd-connect/badge.svg)](https://coveralls.io/github/intel/mfd-connect) ## Usage ```python from mfd_connect import LocalConnection @@ -1112,4 +1113,4 @@ If code cannot establish connection, it will start deployment of python using [D ## Issue reporting -If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue [here](https://github.com/intel/mfd-connect/issues). \ No newline at end of file +If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue [here](https://github.com/intel/mfd-connect/issues). From be5cff59c3ca8c9e8734bb36c423066eda2e1d98 Mon Sep 17 00:00:00 2001 From: "Lasota, Adrian" Date: Mon, 21 Jul 2025 11:18:39 +0200 Subject: [PATCH 3/3] fix: Update mfd-code-quality dependency to specific git version for coverage debugging Signed-off-by: Lasota, Adrian --- .github/workflows/build_upload_whl.yml | 1 + requirements-dev.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_upload_whl.yml b/.github/workflows/build_upload_whl.yml index e6696fd..4955cbb 100644 --- a/.github/workflows/build_upload_whl.yml +++ b/.github/workflows/build_upload_whl.yml @@ -123,6 +123,7 @@ jobs: cd ${{ inputs.SOURCE_PATH }} ../whl_creation/bin/python -m build --wheel --outdir ../whl_creation/dist ls -l ../whl_creation/dist + rm -rf *.egg-info - name: Determine if unit and functional tests should run id: test_check diff --git a/requirements-dev.txt b/requirements-dev.txt index 233862e..55f94fc 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,3 @@ -r requirements-test.txt # Ensure tests dependencies are automatically included pydantic -mfd-code-quality >= 1.2.0, < 2 \ No newline at end of file +mfd-code-quality @ git+https://github.com/intel/mfd-code-quality.git@coverage-debug \ No newline at end of file