ci: migrate workflows to shared uv_setup composite action and uv sync#420
Open
erichare wants to merge 2 commits into
Open
ci: migrate workflows to shared uv_setup composite action and uv sync#420erichare wants to merge 2 commits into
erichare wants to merge 2 commits into
Conversation
Migrate lint, local, main, unit, and codecov_aggregator workflows from the legacy bootstrap (actions/setup-python@v2 + pip install --upgrade pip + pipx install uv + make venv) to the shared ./.github/actions/uv_setup composite action followed by `uv sync --dev`. The composite action wraps astral-sh/setup-uv@v6 (pinned uv 0.8.11) and provisions Python in one step, centralizing the toolchain version so all jobs stay consistent. This is a mechanical, no-behavior-change migration: same Python versions, same dev dependency set; only the install mechanism changes. `make venv` remains for local development. Split out of the release-workflow hardening (PR #411); release.yml and _test_release.yml are intentionally not touched here.
Coverage reportfor commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the five CI workflows from the legacy Python/uv bootstrap (
actions/setup-python@v2+pip install --upgrade pip+pipx install uv+make venv) to the shared./.github/actions/uv_setupcomposite action followed byuv sync --dev.The composite action (
.github/actions/uv_setup/action.yml) wrapsastral-sh/setup-uv@v6, which installs a pinneduv(currently0.8.11) and provisions the requested Python version in one step. This removes the need for a separatesetup-pythonstep and the manual pip/pipx/make bootstrap, centralizing the toolchain version (uv pin + setup mechanism) in a single place so all jobs stay consistent.This is a mechanical, no-behavior-change migration: the same Python versions are installed and the same dev dependency set is resolved. Only the mechanism of installation changes. Nothing in the package, tests, or Makefile is modified — the
make venvtarget still exists for local development; CI simply no longer routes through it.Per-file changes
All five edits follow the same shape — replace the two setup/install steps with the composite action +
uv sync --dev:.github/workflows/lint.yml— Python 3.11.setup-python@v2+ pip/pipx/make venvreplaced withuv_setup(3.11) +uv sync --dev..github/workflows/local.yml— Python 3.12. Same migration; the subsequent AWS OIDC credentials step is unchanged..github/workflows/main.yml— Python 3.12. Same migration;pyteststep unchanged..github/workflows/unit.yml— uses the matrix value${{ matrix.python-version }}(unchanged); only the setup/install steps are migrated..github/workflows/codecov_aggregator.yml— Python 3.11. Same migration; the existingif: ${{ github.event.action != 'closed' }}guards on both steps are preserved, and the step is renamed "Set up Python" → "Set up Python + uv" to match the others.Minor cosmetic alignment also applied: quoting
python-versionvalues consistently (e.g.3.11→"3.11"), renaming the setup step to "Set up Python + uv", and addingshell: bashto theuv sync --devrun steps.Scope note
This PR is the CI-tooling half of the split of #411. The release-robustness changes (check-pypi version-exists gate, the
success()fix onrelease.yml, and re-enabling Sigstore attestations on the PyPI publish steps) are intentionally excluded and will land in a separate PR.release.ymland_test_release.ymlare not touched here.Verification
actions/setup-python,pipx install uv, ormake venv.yaml.safe_load)..github/actions/uv_setup/action.ymlusesastral-sh/setup-uv@v6and pinsUV_VERSION: 0.8.11, accepting apython-versioninput (MAJOR.MINOR) — matching how every call site invokes it.make venvremains a valid Makefile target, so local developer workflows are unaffected by its removal from CI.Test plan
uvresolves the dev dependency group viauv sync --devand the correct Python version is provisioned.codecov_aggregatorstill skips its setup/install steps onclosedevents (guards preserved).