diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 95a647a..2efc1b0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,6 +48,17 @@ jobs: if: always() run: python -m coverage xml -o coverage.xml + # Single-matrix upload (informational). Matrix jobs still gate with --fail-under=60. + - name: Upload coverage to Codecov + if: always() && matrix.python-version == '3.12' + uses: codecov/codecov-action@v5 + with: + files: ./coverage.xml + flags: unittests + name: ubuntu-3.12 + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} + # CIP-0001 R11: optional MPI parity while mpi4py support still exists. mpi: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 4a81139..3150164 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ Deep GP The Python Implementation of Deep Gaussian Processes +| Branch | Tests | Coverage | +| --- | --- | --- | +| `main` | [![Tests](https://github.com/SheffieldML/PyDeepGP/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/SheffieldML/PyDeepGP/actions/workflows/tests.yml?query=branch%3Amain) | [![codecov](https://codecov.io/gh/SheffieldML/PyDeepGP/branch/main/graph/badge.svg)](https://codecov.io/gh/SheffieldML/PyDeepGP/branch/main) | + Currently implemented models are * Deep GPs @@ -12,6 +16,7 @@ Testing ------- GitHub Actions runs the unit tests (with coverage) on pull requests and pushes to `main`. +The Ubuntu / Python 3.12 job uploads ``coverage.xml`` to [Codecov](https://codecov.io). Requires **Python >=3.11** when using GPy 1.15+. diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..96d51df --- /dev/null +++ b/codecov.yml @@ -0,0 +1,28 @@ +codecov: + branch: main + +coverage: + precision: 2 + round: down + range: "40...100" + + status: + # CI already enforces --fail-under=60 on the maintained surface (.coveragerc). + # Codecov statuses are informational so PRs stay mergeable while comments still flag gaps. + project: + default: + target: auto + informational: true + if_no_uploads: success + + patch: + default: + target: 50% + informational: true + if_no_uploads: success + + changes: false + +comment: + layout: "header, diff, flags" + behavior: default