Skip to content

CI: Modernize CI/CD suite using uv for 50% faster execution#122

Open
abstract-333 wants to merge 6 commits intoipinfo:masterfrom
abstract-333:feat/update-github-action
Open

CI: Modernize CI/CD suite using uv for 50% faster execution#122
abstract-333 wants to merge 6 commits intoipinfo:masterfrom
abstract-333:feat/update-github-action

Conversation

@abstract-333
Copy link

📝 Description

This PR transitions the project's GitHub Actions workflows from standard pip/setuptools to uv. This modernization significantly reduces the time spent in CI runners, simplifies dependency management, and adopts the latest GitHub Action versions.

🚀 Performance Improvements

  • Time Savings: Both the Test and Release actions saw a reduction of 10–15 seconds per run.
  • Rapid Environment Setup: uv resolves and installs dependencies significantly faster than standard pip, especially in the "Test" matrix.

🛠 Key Technical Changes

  • Consolidated Tooling: Migrated from pypa/gh-action-pypi-publish to native uv publish in cd_pypi.yml.
  • Efficient Builds: Implemented uv build --no-build-isolation to leverage the existing environment, avoiding the overhead of creating temporary build venvs.
  • Unified Setup: Standardized on astral-sh/setup-uv@v7 across all workflows.
  • Action Updates: Bumped core actions to their latest versions (actions/checkout@v6, actions/setup-python@v6) for better security and runner compatibility.

🛡 Zero Breaking Changes

  • No Environment Changes: I did not modify requirements.txt or setup.py.
  • Backward Compatibility: Maintainers and contributors can continue to use pip and pytest locally exactly as they do today. The use of uv is isolated to the CI environment.
  • Security: Maintained OpenID Connect (OIDC) "Trusted Publishing" via id-token: write permissions for secure, passwordless PyPI uploads.

✅ Verification & Testing

I have verified these changes on a fork to ensure stability:

  1. Release Dry Run: Successfully executed uv publish --dry-run to verify the OIDC handshake and package integrity.
  2. Artifact Inspection: Verified that uv build generates correct wheel and sdist structures.

- Upgrade actions/checkout and actions/setup-python to v6.
- Replace pip and setup.py with astral-sh/setup-uv.
- Use uv build for PEP 621 compliant builds.
- Replace pip install with uv pip install using existing requirements.txt.
- Update actions/checkout and actions/setup-python to v6.
- Use astral-sh/setup-uv for optimized caching.
- Consolidated build and publish steps into uv
- Leverages OIDC (Trusted Publishing) natively
- Reduces workflow overhead by removing extra action steps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant