-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Use build-and-inspect-python-package action #10722
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
Use build-and-inspect-python-package action #10722
Conversation
This uses https://github.com/hynek/build-and-inspect-python-package to ensure our package is correct, both during testing and deploy,
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.
Most lovely
I need to adopt this to my stuff now, it's awesome
Thanks to @hynek for providing
run: | | ||
python -m build | ||
- name: Build and Check Package | ||
uses: hynek/build-and-inspect-python-package@v1.5 |
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.
Actually I'm not entirely sure that this will produce the packages in the standard location, so the Publish package to PyPI
will be able to pick them up.
Looking at the action code, it builds the packages in a temporary directory: https://github.com/hynek/build-and-inspect-python-package/blob/0b1716730c334a22b313808557b14b6190896bc3/action.yml#L40
I will have to test this out in a separate repository before being confident this will work.
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.
FTR you can't access them from other actions (like the upload action) because it's under /tmp
. Use a download-artifact
like here (you may be also able to cp -a
them I guess).
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.
Yeah, thanks, that's what I did here: pytest-dev/pytest-mock#343
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.
Tested the same approach in pytest-dev/pytest-forked#82 and it works well. 👍
This uses https://github.com/hynek/build-and-inspect-python-package to ensure our package is correct, both during testing and deploy,
[7.2.x] Use build-and-inspect-python-package action (#10722)
This uses https://github.com/hynek/build-and-inspect-python-package to ensure our package is correct, both during testing and deploy.
Also include option to cancel running jobs when new commits for the same branch are pushed.