Dependency bots¶
wheelgap's pull-request gate works with both Dependabot and Renovate. The gate runs in GitHub Actions on the dependency bot's pull request; it does not need a separate command or a Renovate post-upgrade hook.
The gate compares the pull request's lockfile with the base branch. It fails only when the update adds a package with a wheel gap or makes an existing package worse on a target you support. For example, if a bump replaces a release that has a Windows ARM wheel with one that does not, the check fails and the report names the package, the bumped version and the target. Whenever the check runs, the job summary has the report, and with the fix input (on by default) each gap there gets its fix: an upgrade to the nearest release that has the wheel, else an unofficial gap wheel, else why there's none (how it says it). With comment: true, wheelgap also posts or updates one pull-request comment with the same report when something got worse.
Dependabot¶
For a project using uv.lock, add a uv entry to .github/dependabot.yml. Keep any existing entries, such as the GitHub Actions updater:
version: 2
updates:
- package-ecosystem: uv
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
Use package-ecosystem: pip instead when Dependabot should update a pinned requirements.txt, a poetry.lock or a Pipfile.lock rather than a uv.lock. Then start the workflow's args with that file instead of uv.lock: the gate compares a lockfile or a pinned requirements file on both sides, so a project with only version ranges in pyproject.toml and no lockfile can't be gated this way, and a requirements file that includes others with -r or -c can't be compared yet (CI). See GitHub's supported ecosystems for the files each manager reads.
Add the gate workflow from CI to .github/workflows/wheelgap.yml. For example:
name: wheelgap
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
wheels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
- uses: wheelgap/wheelgap@v0.15.0
with:
args: uv.lock -p 3.13 -t linux-x86_64,linux-aarch64,win-arm64
compare-to: base
comment: true
Dependabot pull-request workflows receive a read-only GITHUB_TOKEN by default. Requesting pull-requests: write in the workflow permissions allows the job to request the permission needed for the comment, subject to the repository or organization policy. If GitHub still supplies a read-only token, the comment cannot be created: wheelgap emits a warning and the complete report remains in the Actions job summary. Do not move this workflow to pull_request_target or workflow_run to work around the restriction; wheelgap deliberately refuses comments on those events because the pull request's files must be treated as untrusted.
If comments are not needed, omit pull-requests: write and set comment: false (or leave its default). The job summary still reports the result.
Renovate¶
Renovate reads pyproject.toml with its pep621 manager and updates it and uv.lock together. A minimal renovate.json is enough:
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"]
}
Add the same wheelgap.yml workflow shown above. Renovate normally opens pull requests from branches in the same repository, so the workflow can use the repository's configured GITHUB_TOKEN permissions. Keep pull-requests: write when you want comment: true; otherwise the job summary is sufficient.
No postUpgradeTasks configuration is needed. Renovate updates pyproject.toml and uv.lock; GitHub Actions runs wheelgap as a normal pull_request check after the PR is opened and on subsequent pushes. That holds for the Mend Renovate app and for self-hosted Renovate with a GitHub App or personal access token; pull requests and pushes made with a workflow's default GITHUB_TOKEN don't start other workflows, so a self-hosted Renovate that uses it never triggers the gate.
See the upstream guides for uv with Renovate and Renovate's configuration.