Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Describe the Feature
Gate .github/workflows/release-pypi-build-push-package.yml on the test suite and on the package it is about to publish. Today the release job does bump → clean → build → twine check → upload with no tests at all, and it publishes whatever master points to rather than the released tag.
Current problems
| Problem | Detail |
|---|---|
| No tests before publishing | Neither the unit tests nor the bats suite run in the release workflow. Between #316 (2026-04-09) and #322 (2026-09-15) the unit tests were red on master, so any release cut in that window would have reached PyPI untested. |
Publishes master, not the tag |
actions/checkout uses ref: master on a release: published event. If master moved after the tag was cut, PyPI gets a different commit than the one released on GitHub. |
| Version taken from the latest tag | make bump-version-ci uses git tag --sort=version:refname | tail -1, not the tag being released. Releasing a patch on an older line would stamp the wrong version. |
| The built wheel is never exercised | Every CI job installs the CLI with pip install -e .. Nothing installs the wheel from dist/, so a packaging error (missing templates, broken entry point) would only show up for users. |
Dead git push step |
commit_push runs git push but nothing is ever committed, so it is a no-op (and fails on a detached tag checkout). |
Expected Behavior
A release reaches PyPI only if:
- the unit tests pass on the full Python matrix (3.9 - 3.13) on the tagged commit, and
- the wheel built for that tag installs in a clean environment, reports the tag's version, and passes the bats suite.
Use Case
Since the branch protection change, a PR cannot merge with red checks, but a release can still publish a broken artifact: the protection only covers what goes into master, not what goes to PyPI. The release is the last point where a defect can be stopped before it reaches every user.
Describe Ideal Solution
Split the release job into build → (unit_tests ‖ smoke) → publish, reusing the existing test workflows instead of duplicating them:
tests-unit.ymlandtests-integration.yamlgain aworkflow_calltrigger.tests-integration.yamlaccepts an optional built distributable artifact: when given, the bats job installs that wheel instead of the editable checkout, checksleverage --versionagainst the expected version, and the ref-arch job is skipped.buildchecks out the release tag, stamps that tag's version, builds and runstwine check, and uploadsdist/as an artifact.publishneeds both test jobs, downloads the very samedist/and uploads it to PyPI.- Drop the
commit_pushstep.
Alternatives Considered
- Running the tests inline in the release workflow: duplicates the setup of both test workflows, which then drift apart.
- Including the ref-arch E2E in the gate: it is being reworked in Enhancement | Modernize the ref-arch integration test (integration_tests_cli_refarch) #330, and the bats suite is enough to validate the artifact. It can be added to the gate once Enhancement | Modernize the ref-arch integration test (integration_tests_cli_refarch) #330 lands.
Additional Context
- Follow-up, out of scope here: the Test PyPI workflow (
release-pypi-build-push-test-package.yml) has the same gap. - Comes from the test strategy review of 2026-11-09 (finding H2).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity