Skip to content

feat: add coverage measurements to release workflow for release-please PRs - #66

Merged
spmse merged 2 commits into
mainfrom
copilot/add-coverage-measurements
Aug 2, 2026
Merged

spmse merged 2 commits into
mainfrom
copilot/add-coverage-measurements

Conversation

Copilot AI commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Coverage now runs as part of the release workflow when a release-please PR is opened or updated, in addition to the existing post-merge coverage in build-release-evidence.

Changes to .github/workflows/release.yml:

  • Added pull_request trigger (targeting main, types: opened, synchronize, reopened) alongside the existing push trigger
  • Added if: github.event_name == 'push' guard to the release-please job so it only fires on pushes — downstream jobs (build-release-evidence, build-documentation, deploy-documentation) are naturally skipped on PR events via needs propagation
  • New release-coverage job runs only when github.event_name == 'pull_request' && startsWith(github.head_ref, 'release-please--'): installs deps, runs pytest with coverage (80% threshold), uploads to Codecov, posts a coverage comment on the PR, and uploads artifacts — mirroring the existing coverage.yml approach

Why

The coverage.yml workflow only triggers on changes to packages/core/src/** or packages/core/tests/**. Release-please PRs only touch changelogs, version files, and manifests, so coverage never ran during the release lifecycle. This meant coverage info in the README could go stale without a code change to force a refresh.

Validation

  • python -m ruff check .
  • python -m ruff format --check .
  • python -m pytest
  • python -m build --sdist --wheel
  • Not applicable — workflow-only change; YAML syntax validated; no secrets detected

Documentation

  • No documentation update was needed.

Scope

  • This pull request is focused on one feature or fix.
  • Tests were added or updated for functional changes.
  • Assumptions, risks, or follow-up work are described below.

Risks or follow-up

  • The release-coverage job uses github.head_ref to detect release-please branches (release-please--**). This assumes release-please follows its standard branch naming convention.
  • Coverage threshold is hardcoded at 80% (matching coverage.yml) — if the threshold changes in one place it should be updated in both.

Copilot AI linked an issue Aug 2, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add coverage measurements to release workflows feat: add coverage measurements to release workflow for release-please PRs Aug 2, 2026
Copilot AI requested a review from spmse August 2, 2026 11:45
@spmse
spmse marked this pull request as ready for review August 2, 2026 11:46
@spmse
spmse merged commit c6eece6 into main Aug 2, 2026
5 checks passed
@spmse
spmse deleted the copilot/add-coverage-measurements branch August 2, 2026 16:35
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.

Add coverage measurements to release workflows

2 participants