ci: Migrate to uv and slash CI time by 55%#664
Conversation
- Bump actions/checkout from v4 to v6 - Bump actions/setup-python from v5 to v6 - Ensure compatibility with latest runner environments
- Upgrade actions/checkout and actions/setup-python to v6 - Implement astral-sh/setup-uv@v7 for faster dependency installs - Pin uv version to 0.10.7 - Enable uv caching targeting requirements-test.txt
- Remove torch and torchvision from requirements-test.txt - Install torch/torchvision via CPU index separately to avoid cache bloat - Restrict uv caching to lightweight libraries for faster restore - Upgrade actions to v6 and pin uv to 0.10.7
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the efficiency of the continuous integration pipeline. By transitioning from pip to uv for dependency management and implementing a robust caching mechanism, the CI workflow's total runtime has been drastically reduced, leading to faster feedback cycles and more streamlined development. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request migrates the CI from pip to uv, which significantly improves performance by optimizing dependency installation and caching. The changes involve updating GitHub Actions and removing torch and torchvision from the test requirements. My review focuses on further improving dependency management in .github/requirements-test.txt for better maintainability. I've suggested removing a redundant dependency, which also resolves a minor formatting issue.
Note: Security Review has been skipped due to the limited scope of the PR.
📝 Summary
This PR optimizes the CI test workflow by migrating dependency installation from pip to uv and implementing a more efficient caching strategy.
In previous versions, dependency caching with
pipwas not working properly. As a result, all dependencies were installed from scratch on every CI run, which significantly increased the workflow runtime.🛠️ Changes
🛡 Zero Breaking Changes
requirements.txtandsetup.pyremain untouched.Core Action Upgrades
actions/checkout@v4→v6actions/setup-python@v5→v6Dependency Management
astral-sh/setup-uv@v7(pinned to0.10.7)CI Cache Optimization
torchandtorchvisionfrom.github/requirements-test.txtto:⚡ Performance Impact
🧪 Verification
make style)make quality)make license)⏱ Workflow execution time: ~40 seconds
🔗 GitHub Actions run:
https://github.com/abstract-333/EasyR1/actions/runs/22881238873