Skip to content

Conversation

@bhimrazy
Copy link

@bhimrazy bhimrazy commented Dec 3, 2025

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.

This could be a breaking change.

Changes Made:

  • Replaced actions/setup-python with astral-sh/setup-uv in all workflows
  • Updated composite actions to use uv commands (uv pip, uv build, etc.)
  • Added uv caching with enable-cache: true and uv cache prune --ci
  • Added UV_TORCH_BACKEND: cpu for PyTorch installations

Benefits:

  • Faster CI runs due to uv's superior performance
  • Better caching and dependency resolution
  • Optimized PyTorch installations

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/

- 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
Copilot AI review requested due to automatic review settings December 3, 2025 19:41
@github-actions github-actions bot added the ci/cd Continuous integration and delivery label Dec 3, 2025
Copilot finished reviewing on behalf of bhimrazy December 3, 2025 19:45
Copy link
Contributor

Copilot AI 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

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: cpu environment 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.

@github-actions github-actions bot added the tests label Dec 3, 2025
@bhimrazy bhimrazy changed the title Upgrade GitHub Actions to use uv instead of pip feat: upgrade github actions/workflows to use uv Dec 4, 2025
@bhimrazy bhimrazy changed the title feat: upgrade github actions/workflows to use uv feat: upgrade github actions/workflows to uv Dec 4, 2025
Copy link
Author

@bhimrazy bhimrazy left a comment

Choose a reason for hiding this comment

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

Checked

@bhimrazy bhimrazy mentioned this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd Continuous integration and delivery tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant