Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve CI infrastructure for pre-commit#2110

Merged
EliahKagan merged 2 commits intogitpython-developers:mainfrom
EliahKagan:pre-commit-infra
Mar 9, 2026
Merged

Improve CI infrastructure for pre-commit#2110
EliahKagan merged 2 commits intogitpython-developers:mainfrom
EliahKagan:pre-commit-infra

Conversation

@EliahKagan
Copy link
Member

@EliahKaganEliahKagan commentedMar 9, 2026
edited
Loading

On CI, thepre-commit job has two shortcomings:

  • It runs on a machine far more powerful than necessary, since anything slow should not be done inpre-commit at all (since some developers may runpre-commit locally).
  • We've haven't been using any automated means of keeping the pre-commit hook versions up to date, and as a results some of them are quite old. This includesruff. (There is an external integration that can keep pre-commit hooks up to date on GitHub, but it requires providing access to the repository to an external service. This is sometimes a tradeoff worth making, but it's one we've avoided doing here for this purpose, I think rightly.)

These have both become easier to address recently:

  • A lighter-weightubuntu-slim runner is available. Running it on that should work as well and be as fast, and give an indication that we're doing too much inpre-commit if that is ever not the case. It also frees up anubuntu-latest runner, potentially making CI finish slightly earlier in some PRs where there have been a lot of pushes.
  • Dependabot now supportspre-commit as a beta ecosystem, so it can keep them up to date. I've tested this in my fork; the resulting grouped PR looks likeEliahKagan#5. It's not ideal that the ecosystem is still in beta, but I think it's worth using--and if it turns out to have bugs I haven't yet observed, then this is an oppportunity for me to report them.

This PR uses theubuntu-slim runner to runpre-commit on CI, and enables Dependabot version updates forpre-commit hooks.

The `ubuntu-slim` runner is lighter weight, being a containerrather than using a whole VM, and having only one vCPU, less RAM,and a 15 minute time limit. It's not suitable for most of our CIjobs in GitPython, but it should work well for our `pre-commit`checks. (If it doesn't, that's reason to suspect they might bebetter removed from `pre-commit` and run in a different way.)-https://github.blog/changelog/2026-01-22-1-vcpu-linux-runner-now-generally-available-in-github-actions/-https://github.com/actions/runner-images/blob/main/images/ubuntu-slim/ubuntu-slim-Readme.md
- Add `pre-commit` as an ecosystem for Dependabot version updates,  now that it is available as a beta ecosystem. Enable beta  ecosystems to allow this.- Group the updates and use a monthly cadence to avoid getting  swamped by frequent automated PRs.- It would be valuable in the future to Use a 7-day cooldown period  rather than taking new versions immediately once released. (This  may also be of value to developers who use `pre-commit` locally.)  However, this doesn't do that, since the Dependabot ecosystem for  `pre-commit` does not currently support `cooldown`.- Use a less busy style (less unnecessary quoting) than was being  used in `dependabot.yml` before, since this new stanza is more  elaborate than before. Apply that style to the existing stanzas  for consistency.
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull request overview

Adjusts CI configuration to make thepre-commit lint job run on a lighter runner and enables Dependabot updates forpre-commit hook versions, keeping hook tooling (e.g., ruff) current without relying on external integrations.

Changes:

  • Switchlint workflow job runner fromubuntu-latest toubuntu-slim.
  • Enable Dependabot beta ecosystems and add grouped monthly updates forpre-commit hooks.
  • Minor YAML normalization in Dependabot config (remove unnecessary quoting).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
.github/workflows/lint.ymlMoves thelint job toubuntu-slim to reduce CI resource usage forpre-commit.
.github/dependabot.ymlEnables beta ecosystems and addspre-commit ecosystem updates grouped into a single PR.

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

You can also share your feedback on Copilot code review.Take the survey.

Copy link
MemberAuthor

@EliahKaganEliahKagan left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Note that this PR (intentionally) does not upgrade any actual pre-commit hooks. Dependabot should open a PR to do that once this merges.

@EliahKaganEliahKagan marked this pull request as ready for reviewMarch 9, 2026 19:44
@EliahKaganEliahKagan merged commit9e6954c intogitpython-developers:mainMar 9, 2026
31 checks passed
@EliahKaganEliahKagan deleted the pre-commit-infra branchMarch 9, 2026 19:45
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@EliahKagan

[8]ページ先頭

©2009-2026 Movatter.jp