Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 4 additions & 20 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
branches:
- develop

permissions:
contents: write

jobs:
coverage:
name: Run Coverage
Expand All @@ -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
Expand All @@ -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: |
Expand All @@ -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
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v5

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instructions on Codecov suggest to this here:

Suggested change
uses: codecov/codecov-action@v5
with: codecov/codecov-action@v5

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know what the difference is.

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)

Expand Down
Loading