diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..d8895a85 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,24 @@ +# Copyright(C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. +# SPDX-License-Identifier: MIT + +codecov: + require_ci_to_pass: true + +coverage: + status: + project: + default: + target: 60% + threshold: 2% + patch: + default: + target: 70% + +ignore: + - "tests/" + - "docs/" + - "scripts/" + - "workshop/" + - "src/gaia/eval/" + - "src/gaia/apps/webui/" + - "setup.py" diff --git a/.github/workflows/test_unit.yml b/.github/workflows/test_unit.yml index dead53e1..cafd7305 100644 --- a/.github/workflows/test_unit.yml +++ b/.github/workflows/test_unit.yml @@ -85,7 +85,17 @@ jobs: echo "=== Running Unit Tests ===" echo "These are fast tests for core SDK components" echo "" - pytest tests/unit/ -v --tb=short --cov=src/gaia --cov-report=term-missing + pytest tests/unit/ -v --tb=short \ + --cov=src/gaia --cov-report=term-missing --cov-report=xml:coverage.xml + + - name: Upload coverage to Codecov + if: always() + uses: codecov/codecov-action@v5 + with: + files: coverage.xml + flags: unit + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false - name: Run DatabaseMixin integration tests env: diff --git a/setup.py b/setup.py index 46301977..3ea1512a 100644 --- a/setup.py +++ b/setup.py @@ -181,6 +181,7 @@ ], "dev": [ "pytest", + "pytest-cov", "pytest-benchmark", "pytest-mock", "pytest-asyncio",