Skip to content

ci: add uv.lock refresh workflow#1291

Open
jkglasbrenner wants to merge 3 commits into
devfrom
1289-add-a-scheduled-workflow-to-refresh-uvlock-on-dev
Open

ci: add uv.lock refresh workflow#1291
jkglasbrenner wants to merge 3 commits into
devfrom
1289-add-a-scheduled-workflow-to-refresh-uvlock-on-dev

Conversation

@jkglasbrenner

Copy link
Copy Markdown
Collaborator

Closes #1289

Summary

This adds a workflow that refreshes uv.lock from dev, recreates a fixed automation branch, and opens or updates one lockfile refresh pull request when the lockfile changes.

The refresh workflow dispatches tox tests and the Sphinx documentation build against the generated automation branch. It then watches those validation workflows and updates the generated pull request body with a validation table, run links, and guidance for handling validation failures.

Because this pull request targets dev, the scheduled trigger is defined here but will not run on cron until the workflow also exists on the repository default branch. The implementation notes and final action-location decision are recorded in Issue #1289.

Testing

  • Ran local checks for the new action helper and workflow wiring, including Python syntax, action-local tests, Ruff, mypy, YAML parsing, actionlint, and gitlint.
  • Verified a dry-run workflow test completed without creating or updating a pull request.
  • Verified a full workflow test created the automation branch, updated scratch PR build: refresh uv.lock #1290, dispatched validation workflows, reported the tox mypy failure and Sphinx success in the pull request body, and failed the refresh workflow after reporting the validation failure.

Test Runs

Add workflow_dispatch support to the tox and Sphinx workflows so automation can request validation
for a branch after creating or updating a lockfile refresh PR.

The new refresh workflow checks out the selected target branch, runs uv lock --upgrade, and stops
before committing if the resolver changes anything besides uv.lock. It supports a dry-run path for
proof runs, recreates one fixed automation branch from the target branch, opens or updates the
matching PR, and dispatches the validation workflows against the automation branch.

Closes #1289
Add a local action that watches the validation workflows dispatched by the uv.lock refresh
workflow and updates the generated PR with a small status table. The monitor records run links,
reports failed jobs when GitHub exposes them, and exits nonzero when validation does not pass.

The refresh workflow now passes the automation branch SHA, PR number, and dispatch timestamp to
the monitor so it can find runs created by the current refresh attempt.
Add the standard Dioptra license header to the action-local test file and tighten the dynamic
module import so the refresh validation Python files pass mypy together.
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.

2 participants