From 561ba509387b919bc5a5c2ba5e1fdd64de25f2df Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Thu, 9 Apr 2026 04:07:04 +0200 Subject: [PATCH 1/3] ci: add Codecov coverage upload to test job Generate XML coverage report and upload to Codecov after tests pass. Uses tokenless upload (public repo). --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7dfca34..0d9f41e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,11 @@ jobs: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v4 - run: uv sync --group dev - - run: uv run pytest tests/ -v --cov=ontokit + - run: uv run pytest tests/ -v --cov=ontokit --cov-report=xml + - uses: codecov/codecov-action@v5 + with: + files: coverage.xml + fail_ci_if_error: true build: runs-on: ubuntu-latest From 988272196607b6a58faf29be7b6a1f9489459649 Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Thu, 9 Apr 2026 04:09:42 +0200 Subject: [PATCH 2/3] ci: use CODECOV_TOKEN for coverage upload on protected branches --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d9f41e..4da983e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,6 +56,7 @@ jobs: - run: uv run pytest tests/ -v --cov=ontokit --cov-report=xml - uses: codecov/codecov-action@v5 with: + token: ${{ secrets.CODECOV_TOKEN }} files: coverage.xml fail_ci_if_error: true From ed46fe14db1eb3d7fbf42b47fed7017be6f24b04 Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Thu, 9 Apr 2026 04:15:49 +0200 Subject: [PATCH 3/3] ci: add fetch-depth and branch coverage for Codecov --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4da983e..6487ff0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,13 +51,14 @@ jobs: REDIS_URL: redis://localhost:6379/0 steps: - uses: actions/checkout@v4 + with: + fetch-depth: 2 - uses: astral-sh/setup-uv@v4 - run: uv sync --group dev - - run: uv run pytest tests/ -v --cov=ontokit --cov-report=xml + - run: uv run pytest tests/ -v --cov=ontokit --cov-branch --cov-report=xml - uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - files: coverage.xml fail_ci_if_error: true build: