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 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/)