Skip to content

ci: report test coverage from a workflow #1063

Closed

Description

@JarryShaw

Is your feature request related to a problem? Please describe.
CI reports pass or fail only. Coverage is configured (pyproject.toml [tool.coverage.*], source = ["pcapkit"], branch = true), but no workflow measures it, so nobody can see how it moves over time.

Describe the solution you'd like
A coverage job that runs the unit suite under coverage run -m pytest on one interpreter. It publishes:

  • the total and per-package table in the job summary;
  • the HTML report as an artifact.

Default trigger: pushes to main and workflow_dispatch. PRs are left off to avoid adding a leg to the queue #1052 is cutting. It lives in its own workflow file, so it doesn't collide with the open unit-tests.yml PRs.

Describe alternatives you've considered
Codecov or Coveralls, which give PR deltas and history but need the owner to install an app or add a token. They can be layered on later.

Additional context
Related: #1052, and the over-testing audit filed alongside this one.

Activity

  1. added this to the 1.5 milestone on Oct 6, 2026
  2. added
    ciPull requests that change CI or workflow configuration (ci: subject prefix)
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 6, 2026
  3. JarryShaw commented on Oct 6, 2026

    @JarryShaw
    OwnerAuthor

    Design changed by owner ruling (paraphrased): coverage is reported on PRs as well as main, and goes into the existing unit-test runs rather than a separate workflow.

    Revised plan:

    • One existing unit-tests.yml leg runs its pytest command under coverage run. No new leg; the cost is that leg's coverage overhead, to be measured.
    • The report goes to the job summary, an HTML artifact, and one sticky PR comment that is updated on each push.
    • PRs from forks get the summary only, because their token is read-only.

    This touches unit-tests.yml, which #1055 and #1059 also edit, so expect a rebase after whichever merges first.

  4. JarryShaw commented on Oct 6, 2026

    @JarryShaw
    OwnerAuthor

    Follow-up ruling (paraphrased): the PR comment doesn't have to be updated in place. A new comment per run is acceptable if the sticky version adds complexity. The worker will pick the simpler of the two, and the PR will say which.

  5. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciPull requests that change CI or workflow configuration (ci: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions