-
Notifications
You must be signed in to change notification settings - Fork 20
feat: upgrade github actions/workflows to uv
#453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Replace actions/setup-python with astral-sh/setup-uv in all workflows - Update composite actions to use uv commands (uv pip, uv build, etc.) - Add uv caching with enable-cache: true and uv cache prune --ci - Add UV_TORCH_BACKEND: cpu for PyTorch installations - Update cache action to only handle conda caching
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates all GitHub Actions workflows and composite actions from using pip to uv for package management, which should improve CI performance through faster dependency resolution and installation. The changes replace actions/setup-python with astral-sh/setup-uv@v7, update all package management commands to use uv pip, and introduce new caching optimizations with uv cache prune --ci.
Key changes:
- Replaced Python setup with uv setup across all workflows and added built-in caching via
enable-cache: true - Converted all pip commands to their uv equivalents (uv pip install, uv pip list, uv build, etc.)
- Added
UV_TORCH_BACKEND: cpuenvironment variable to workflows installing PyTorch for optimized CPU-only installations - Updated the cache composite action to remove pip caching logic since uv handles its own caching
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/release-pypi.yml | Migrated to uv for building and uploading PyPI packages |
| .github/workflows/deploy-docs.yml | Updated docs deployment to use uv with PyTorch CPU backend optimization |
| .github/workflows/cleanup-caches.yml | Migrated cache cleanup script to use uv for dependency installation |
| .github/workflows/ci-testing.yml | Updated test workflow to use uv with caching and PyTorch CPU backend |
| .github/workflows/ci-scripts.yml | Migrated both test-scripts and standalone-run jobs to uv |
| .github/workflows/ci-cli.yml | Updated CLI testing workflow to use uv |
| .github/workflows/check-typing.yml | Migrated type checking workflow to uv with PyTorch optimization |
| .github/workflows/check-schema.yml | Updated schema validation to use uv with duplicate cache pruning steps |
| .github/workflows/check-precommit.yml | Migrated pre-commit workflow to uv |
| .github/workflows/check-package.yml | Updated package building and testing, missing uv setup in merge-artifacts job |
| .github/workflows/check-docs.yml | Migrated documentation checks to uv with PyTorch CPU backend |
| .github/actions/pkg-install/action.yml | Converted all pip commands to uv, with inconsistent working directory for archive installation |
| .github/actions/pkg-create/action.yml | Changed from python -m build to uv build |
| .github/actions/pip-list/action.yml | Updated to use uv pip list command |
| .github/actions/cache/action.yml | Removed pip caching logic, now only handles conda caching |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Explicitly set activate-environment to true for clarity and consistency.
uv
bhimrazy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked
What does this PR do?
This PR upgrades all GitHub Actions and workflows to use uv instead of pip for faster and more efficient package management.
Changes Made:
actions/setup-pythonwithastral-sh/setup-uvin all workflowsenable-cache: trueanduv cache prune --ciUV_TORCH_BACKEND: cpufor PyTorch installationsBenefits:
PR review
Anyone in the community is free to review the PR once the tests have passed.
📚 Documentation preview 📚: https://lit-utilities--453.org.readthedocs.build/en/453/