Skip to content

build: suppress per-shard pytest coverage table in unit-tests CI#38768

Open
feanil wants to merge 1 commit into
masterfrom
feanil/more-useful-unit-test-output
Open

build: suppress per-shard pytest coverage table in unit-tests CI#38768
feanil wants to merge 1 commit into
masterfrom
feanil/more-useful-unit-test-output

Conversation

@feanil

@feanil feanil commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Each unit-test shard was printing a ~3,700-line per-file coverage table at the end of its log (default --cov=. behavior is --cov-report=term). On a failing run, that table sits between the test progress dots and the end of the log, making it tedious to scroll to the failure summary. The numbers are also misleading per shard, since each shard runs only a subset of the suite.

The dedicated coverage job in this same workflow already does the meaningful work: it downloads every shard's .coverage artifact, runs coverage combine + coverage report + coverage xml, and pushes the combined result to codecov.

Passing --cov-report="" to pytest disables only the terminal coverage report. The .coverage data file is still written and uploaded as an artifact, so the coverage job and codecov reporting are unaffected.

What changed

  • .github/workflows/unit-tests.yml: add --cov-report="" to the pytest invocation in the run tests step, with an inline comment explaining the intent.

What this does NOT change

  • The .coverage data file is still produced and uploaded as an artifact.
  • The coverage job still combines all shard artifacts and uploads to codecov.
  • Pytest's own short test summary (the FAILED ... lines) is unchanged — it will now sit near the bottom of each shard's log instead of being buried above a 3.7k-line table.

Motivated by trying to debug failures in #38763, where the failing-test lines were drowned out by per-shard coverage tables.

Each unit-test shard was printing a ~3,700-line per-file coverage
table at the end of its log (the default `--cov=.` behavior is
`--cov-report=term`). The numbers are also misleading per shard
because each shard only runs a subset of the suite.

The dedicated `coverage` job already does the meaningful work: it
downloads every shard's `.coverage` artifact, runs `coverage
combine` + `coverage report` + `coverage xml`, and uploads the
result to codecov. Passing `--cov-report=""` to pytest disables
the terminal report while leaving the `.coverage` data file
intact, so codecov reporting is unaffected and the failure
summary is much easier to find in the CI log.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@feanil feanil requested a review from kdmccormick June 16, 2026 15:31
@feanil feanil marked this pull request as ready for review June 16, 2026 19:22
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