diff --git a/.github/workflows/coverage-badge.yaml b/.github/workflows/coverage-badge.yaml index ed1b08e4e..af273ce95 100644 --- a/.github/workflows/coverage-badge.yaml +++ b/.github/workflows/coverage-badge.yaml @@ -26,7 +26,7 @@ jobs: poetry install --with test - name: Generate coverage report run: | - coverage run -m pytest --omit="src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py" + coverage run --omit="src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py" -m pytest - name: Coverage Badge uses: tj-actions/coverage-badge-py@v2 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 267e1a6c5..51934628d 100755 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -26,7 +26,7 @@ jobs: poetry install --with test - name: Test with pytest and check coverage run: | - coverage run -m pytest + coverage run --omit="src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py" -m pytest coverage=$(coverage report -m | tail -1 | tail -c 4 | head -c 2) if (( $coverage < 90 )); then echo "Coverage failed at ${coverage}%"; exit 1; else echo "Coverage passed, ${coverage}%"; fi - name: Upload to Codecov