Skip to content

ci: run the test suite on the release path, and pin the actions - #7

Merged
routeplane-ops merged 1 commit into
mainfrom
ci/publish-test-gate
Aug 7, 2026
Merged

ci: run the test suite on the release path, and pin the actions#7
routeplane-ops merged 1 commit into
mainfrom
ci/publish-test-gate

Conversation

@routeplane-ops

Copy link
Copy Markdown
Collaborator

The gap

publish.yml builds a wheel and pushes it to PyPI on any v* tag — without running a single assertion.

ruff check, ruff format --check, mypy, and the 3.9–3.13 pytest matrix all exist and all pass. They run on push/PR to main, which the tag path never touches. So a v* tag could be cut from any commit and published to users with nothing having tested it.

The sibling SDK already does this correctly — routeplane-devtools' publish workflow runs its test suite before publishing.

The change

Gate the release on CI by calling it. test: uses: ./.github/workflows/ci.yml, with build depending on it. CI is now workflow_call-able.

Calling rather than restating is deliberate: a second copy of the lint/type/test matrix would be one more thing to keep in sync, and that drift stays invisible until a bad release is already on PyPI.

Pin every action to a commit SHA. These four run on the path that produces and uploads a public artifact, so a moved tag upstream is a supply-chain event.

action pin
actions/checkout 11d5960 (v4.4.0)
actions/setup-python a26af69 (v5.6.0)
actions/upload-artifact ea165f8 (v4.6.2)
actions/download-artifact d3f86a1 (v4.3.0)
pypa/gh-action-pypi-publish dc37677 (v1.14.2)

Pinned at the current majors — this is not a version bump.

One subtlety worth flagging for review: pypa/gh-action-pypi-publish v1.14.2 is an annotated tag, so the SHA its ref points at (a892a5a) is the tag object, not the commit. The commit (dc37677) is what is pinned.

Verification

actionlint clean on both files. Trusted publishing (OIDC, pypi environment) is unchanged — no token secret is introduced.

`publish.yml` built a wheel and pushed it to PyPI on any `v*` tag without
running a single assertion. `ruff`, `mypy` and the 3.9-3.13 `pytest` matrix
all existed and all passed -- on push/PR to `main`, which the tag path never
touches. A tag could be cut from any commit and shipped to users untested.

Gate the release on CI by CALLING it (`workflow_call`) rather than restating
the steps. A second copy of the matrix would be one more thing to keep in
sync, and that drift stays invisible until a bad release is already public.

Also pin every action to a commit SHA. This is the workspace convention and
it matters most here: these four actions run on the path that produces and
uploads a public artifact, so a moved tag upstream is a supply-chain event.
Pinned at the current majors -- this is not a version bump.

Note `pypa/gh-action-pypi-publish` v1.14.2 is an annotated tag, so its commit
SHA differs from the SHA its ref points at; the commit is what is pinned.
@routeplane-ops
routeplane-ops merged commit c528215 into main Aug 7, 2026
6 checks passed
@routeplane-ops
routeplane-ops deleted the ci/publish-test-gate branch August 7, 2026 10:21
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