Skip to content

ci: Add Codecov token and improve coverage configuration - #83

Merged
fjebaker merged 2 commits into
StingraySoftware:mainfrom
Omiii-215:add-codecov-support
Aug 11, 2026
Merged

fjebaker merged 2 commits into
StingraySoftware:mainfrom
Omiii-215:add-codecov-support

Conversation

@Omiii-215

Copy link
Copy Markdown
Collaborator

Summary

This PR improves the Codecov integration in CI by:

  • Adding CODECOV_TOKEN secret for reliable coverage uploads (required since codecov-action v4+)
  • Restricting coverage processing to src/ only — excludes test and docs files from coverage metrics for more accurate reporting
  • Bumping codecov-action from v5 to v7 (latest)

Changes

- uses: julia-actions/julia-processcoverage@v1
+   with:
+     directories: src
- - uses: codecov/codecov-action@v5
+ - uses: codecov/codecov-action@v7
    with:
      files: lcov.info
+     token: ${{ secrets.CODECOV_TOKEN }}

Note for Maintainers

Important

For Codecov uploads to work on the upstream repo, you will need to:

  1. Set up the repository on codecov.io (sign in with GitHub and add StingraySoftware/Stingray.jl)
  2. Copy the Repository Upload Token from Codecov → Configuration → General
  3. Add a GitHub repository secret named CODECOV_TOKEN with the token value
    • Go to repo Settings → Secrets and variables → Actions → New repository secret

Without this secret, coverage uploads will silently fail on codecov-action v4+.
For public repos, tokenless uploads may still work, but using a token is recommended for reliability.

- Add CODECOV_TOKEN secret for reliable coverage uploads (required since codecov-action v4+)
- Restrict coverage processing to src/ directory only (excludes test/docs from metrics)
- Bump codecov-action from v5 to v7 (latest)
@codecov-commenter

codecov-commenter commented Jul 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.34%. Comparing base (0ce31db) to head (32685e5).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #83   +/-   ##
=======================================
  Coverage   89.34%   89.34%           
=======================================
  Files           8        8           
  Lines        1605     1605           
=======================================
  Hits         1434     1434           
  Misses        171      171           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Add .github/codecov.yml with patch coverage (80% target) and project coverage settings
- Restrict coverage processing to src/ directory only
- Bump codecov-action from v5 to v7
- Add CODECOV_TOKEN for reliable uploads
@fjebaker
fjebaker merged commit efff791 into StingraySoftware:main Aug 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants