diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f30b349..831099d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,8 +41,14 @@ jobs: with: retries: 1 # Retry once after initial attempt run: | - python -m pytest tests -v + python -m pytest tests -v --cov=./ --cov-report=xml:coverage.xml - name: Run CLI tests run: | ultralytics-actions-info + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 7a55f85..ee9e5e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,6 +73,7 @@ dependencies = [ [project.optional-dependencies] dev = [ "pytest", + "pytest-cov", ] [project.urls]