Skip to content

docs: fix coveralls badge not rendering in README#620

Merged
mxschmitt merged 1 commit into
mainfrom
fix/coveralls-badge-rendering
Jun 26, 2026
Merged

docs: fix coveralls badge not rendering in README#620
mxschmitt merged 1 commit into
mainfrom
fix/coveralls-badge-rendering

Conversation

@mxschmitt

Copy link
Copy Markdown
Owner

Problem

The coveralls coverage badge doesn't render in the README — it shows as a broken image.

Root cause

The coveralls native badge (coveralls.io/repos/.../badge.svg) responds with a 302 redirect to an S3-hosted SVG (s3.amazonaws.com/assets.coveralls.io/badges/coveralls_79.svg) that is served with Cache-Control: no-cache. GitHub renders README images through its Camo proxy, which won't reliably serve a redirected image marked no-cache, so the badge breaks.

Fix

Switch the image source to the shields.io coveralls endpoint, which serves a directly-served, cacheable image/svg+xml (Cache-Control: max-age=120) that Camo renders correctly. The badge still links through to the coveralls dashboard, and the value matches (coverage: 79%).

-[![Coverage Status](https://coveralls.io/repos/github/playwright-community/playwright-go/badge.svg?branch=main)](...)
+[![Coverage Status](https://img.shields.io/coverallsCoverage/github/playwright-community/playwright-go?branch=main)](...)

The coveralls native badge serves the SVG via a 302 redirect to an
S3 asset marked Cache-Control: no-cache, which GitHub's Camo image
proxy won't render. Switch to the shields.io coveralls endpoint, which
returns a directly-served, cacheable SVG. The link still points at the
coveralls dashboard.
@mxschmitt mxschmitt force-pushed the fix/coveralls-badge-rendering branch from bc80881 to f10d2a2 Compare June 26, 2026 20:01
@mxschmitt mxschmitt merged commit 1c4f633 into main Jun 26, 2026
20 of 21 checks passed
@mxschmitt mxschmitt deleted the fix/coveralls-badge-rendering branch June 26, 2026 20:02
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