Skip to content

Fix stale Coveralls badge and re-wire coverage upload - #20

Merged
jakehadar merged 1 commit into
masterfrom
revitalize-coverage-badge
Jul 31, 2026
Merged

Fix stale Coveralls badge and re-wire coverage upload#20
jakehadar merged 1 commit into
masterfrom
revitalize-coverage-badge

Conversation

@jakehadar

Copy link
Copy Markdown
Owner

Summary

The Coveralls badge hasn't updated since ~2019 for two separate reasons:

  1. Wrong badge URL: pointed at jakehadar/bikeshare-client (missing -python) on branch=coverage, not this repo's actual slug or default branch. Even with fresh data flowing, this badge would never have rendered it.
  2. No upload path exists anymore: the old .travis.yml ran coveralls in after_success; when Travis was replaced with GitHub Actions, nothing replaced that upload step. The Test workflow computes coverage locally (coverage report -m) but never sends it anywhere.

Changes

  • Fixed the badge URL/link to jakehadar/bikeshare-client-python on branch=master
  • Added a coverage upload step to .github/workflows/test.yml: generates an lcov report via coverage lcov, uploads via coverallsapp/github-action@v2
  • Gated the upload to a single matrix leg (Python 3.13) rather than all 6, to avoid submitting conflicting reports for the same commit
  • Uses the Coveralls GitHub App integration (GITHUB_TOKEN) rather than a stored repo token secret

Before merging

Repo must be enabled on coveralls.io first: log into coveralls.io with GitHub, use the GitHub App integration to add bikeshare-client-python. Without that, the upload step will fail (nothing to receive the report).

Test plan

  • Verified coverage lcov -o coverage.lcov produces a valid LCOV report locally (Python 3.8, coverage.py 7.6.1)
  • Workflow YAML parses correctly
  • First live run after merge, once the repo is enabled on coveralls.io

🤖 Generated with Claude Code

The badge pointed at the wrong repo entirely (jakehadar/bikeshare-client,
missing "-python") on a branch=coverage that isn't the default branch -
Coveralls had nothing to render regardless of upload activity.

Separately, nothing has uploaded coverage data since Travis CI was
removed; the old .travis.yml ran `coveralls` in after_success, and its
replacement (Test workflow) only prints a local coverage report, never
sends it anywhere.

- Point the badge at the correct repo slug and master branch
- Add a coverage.py -> lcov -> coverallsapp/github-action upload step,
  gated to a single matrix leg (3.13) to avoid submitting 6 conflicting
  reports for the same commit
- Uses the Coveralls GitHub App integration (GITHUB_TOKEN), no separate
  repo token secret needed

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jakehadar
jakehadar merged commit a94578f into master Jul 31, 2026
7 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.

1 participant