From c1284a23b9745d03e0e433ae9fbe86c1c1f631b1 Mon Sep 17 00:00:00 2001 From: edvinskis Date: Thu, 23 Jul 2026 11:11:14 +0200 Subject: [PATCH 1/2] Use Codecov and remove badge commit step Replace the custom badge generation and auto-commit with a codecov/codecov-action. Removed the permissions block, checkout fetch-depth override, genbadge installation, and the steps that generated/committed badges; workflow now uploads reports/coverage/coverage.xml to Codecov to simplify coverage reporting. --- .github/workflows/coverage.yml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f76e0fc..4c2bd0b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,9 +8,6 @@ on: branches: - develop -permissions: - contents: write - jobs: coverage: name: Run Coverage @@ -19,8 +16,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v6 - with: - fetch-depth: 0 - name: Set up Python 3.13 uses: actions/setup-python@v6 @@ -39,7 +34,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -e ".[dev]" - pip install "genbadge[coverage]" - name: Run pytest with coverage run: | @@ -56,17 +50,7 @@ jobs: coverage report --show-missing >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY - - name: Generate coverage badge - run: | - genbadge coverage -i reports/coverage/coverage.xml -o badges/coverage-badge.svg - - - name: Commit updated badge - if: github.event_name == 'push' - run: | - git config --local user.name "github-actions[bot]" - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git add badges/coverage-badge.svg - git diff --cached --quiet && exit 0 - git commit -m "Update coverage badge [skip ci]" - git pull --rebase origin develop - git push \ No newline at end of file + - name: Upload coverage reports to Codecov with GitHub Action + uses: codecov/codecov-action@v5 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From 123ce1da5fd45e64708059a5d2540cd91e9decdc Mon Sep 17 00:00:00 2001 From: edvinskis Date: Thu, 23 Jul 2026 11:12:33 +0200 Subject: [PATCH 2/2] Replace coverage badge with Codecov badge Update README badge to use Codecov (linking to the reactix repo on the develop branch) instead of the previous coverage image. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1cd5d37..f5d25cf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![PyPI](https://img.shields.io/pypi/v/reactix)](https://pypi.org/project/reactix/) [![Python](https://img.shields.io/pypi/pyversions/reactix)](https://pypi.org/project/reactix/) [![PyTest](https://github.com/astoeriko/reactix/actions/workflows/pytest.yml/badge.svg)](https://github.com/astoeriko/reactix/actions/workflows/pytest.yml) -[![Coverage](https://raw.githubusercontent.com/astoeriko/reactix/develop/badges/coverage-badge.svg)](https://github.com/astoeriko/reactix/actions/workflows/coverage.yml) +[![codecov](https://codecov.io/gh/astoeriko/reactix/branch/develop/graph/badge.svg)](https://codecov.io/gh/astoeriko/reactix) [![License](https://img.shields.io/github/license/astoeriko/reactix)](LICENSE) [![Docs](https://img.shields.io/badge/docs-latest-blue)](https://astoeriko.github.io/reactix/)