refactor: separate build, test, and deploy in Python workflow#2308
Merged
samfreund merged 5 commits intoPhotonVision:mainfrom Jan 17, 2026
Merged
Conversation
- Split build-and-deploy into three jobs: build, test, build-python-examples, deploy - Build job only builds the wheel and uploads artifact - Test job downloads artifact and runs tests - build-python-examples uses the pre-built artifact, removes redundant builds - Deploy waits for both test and build-python-examples to succeed - Simplify run.sh to not rebuild wheel since it's already installed Amp-Thread-ID: https://ampcode.com/threads/T-019bc9a4-013e-7428-bc66-89592eb9eb1a Co-authored-by: Amp <[email protected]>
- Download artifact to repo root instead of source directory - Install package before running tests - Run pytest from repo root so it uses installed package, not source - Fixes ModuleNotFoundError for photonlibpy.version Amp-Thread-ID: https://ampcode.com/threads/T-019bc9a4-013e-7428-bc66-89592eb9eb1a Co-authored-by: Amp <[email protected]>
- Use pytest --import-mode=importlib to use installed package - Removes need to generate version.py in source
be8a251 to
aea307a
Compare
samfreund
approved these changes
Jan 17, 2026
samfreund
requested changes
Jan 17, 2026
samfreund
approved these changes
Jan 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Test what you build, deploy what you test.
This refactors the Python CI workflow to wait for all tests to pass before publishing photonlibpy to PyPI.
Amp-Thread-ID: https://ampcode.com/threads/T-019bc9a4-013e-7428-bc66-89592eb9eb1a
Meta
Merge checklist: