diff --git a/.github/workflows/build_upload_whl.yml b/.github/workflows/build_upload_whl.yml index 38fec87..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 @@ -163,6 +164,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 +213,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}" 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). 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