Skip to content

Commit cc70f5c

Browse files
authored
ci: Switch from coverage comments to codecov.io (#78)
## Summary Replaces the current coverage comment system with codecov.io integration for better coverage tracking and open source best practices. ## Changes ### Removed: - `irongut/CodeCoverageSummary` action that generates markdown summaries - `marocchino/sticky-pull-request-comment` action that posts PR comments ### Added: - `codecov/codecov-action@v4` to upload coverage data to codecov.io - Configured with `fail_ci_if_error: false` for graceful handling - Uses existing coverage.xml from pytest ## Benefits ✅ **Professional coverage reporting** with codecov.io dashboard ✅ **Coverage badges** for README ✅ **Coverage trend tracking** over time ✅ **Better open source integration** - standard for OSS projects ✅ **No more PR comment spam** - cleaner PR experience ✅ **Free for open source** projects ## Setup Required After merging, you'll need to: 1. **Visit [codecov.io](https://codecov.io)** and sign in with GitHub 2. **Enable the batfish/lab-validation repository** 3. **Add coverage badge** to README (optional) No additional secrets or configuration needed - codecov-action works automatically for public repos. ## Testing This PR tests the new codecov integration. The coverage data should be uploaded to codecov.io when the CI runs.
1 parent b4be1aa commit cc70f5c

1 file changed

Lines changed: 9 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626

2727
test:
2828
runs-on: ubuntu-latest
29+
permissions:
30+
id-token: write
2931

3032
steps:
3133
- uses: actions/checkout@v4
@@ -48,25 +50,14 @@ jobs:
4850
run: |
4951
pytest tests/ -v --tb=short --cov=lab_validation --cov-report=xml --cov-report=term-missing
5052
51-
- name: Code Coverage Summary
52-
uses: irongut/CodeCoverageSummary@v1.3.0
53+
- name: Upload coverage to Codecov
54+
uses: codecov/codecov-action@v5
5355
with:
54-
filename: coverage.xml
55-
badge: true
56-
fail_below_min: false
57-
format: markdown
58-
hide_branch_rate: false
59-
hide_complexity: true
60-
indicators: true
61-
output: both
62-
thresholds: '60 80'
63-
64-
- name: Add Coverage PR Comment
65-
uses: marocchino/sticky-pull-request-comment@v2
66-
if: github.event_name == 'pull_request'
67-
with:
68-
recreate: true
69-
path: code-coverage-results.md
56+
files: ./coverage.xml
57+
flags: unittests
58+
name: codecov-umbrella
59+
fail_ci_if_error: false
60+
use_oidc: true
7061

7162
- name: Test package build
7263
run: |

0 commit comments

Comments
 (0)