-
Notifications
You must be signed in to change notification settings - Fork 3
github: Replace Gr1N/setup-poetry with a composite action that supports caching #28
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
Conversation
|
@mshafer-NI Do you have any feedback on this? I would like to start using this approach in nidaqmx-python, measurement-plugin-python, ni-apis, etc. Perhaps this composite action should be single-sourced in its own repo, or a repo for shared actions like an I'm also considering splitting out the call to setup-python. I think we can figure this out without passing step outputs. |
|
What is the impact of caching the Poetry install? Let's compare https://github.com/ni/nitypes-python/actions/runs/14934916371 to https://github.com/ni/nitypes-python/actions/runs/14948460939/job/41994856909?pr=28.
|
| path: | | ||
| ${{ steps.set-pipx-paths.outputs.pipx-bin-dir }} | ||
| ${{ steps.set-pipx-paths.outputs.pipx-home }} | ||
| key: pipx-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-poetry${{ inputs.poetry-version }} |
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.
setup-python sets the pythonLocation environment variable, so we don't really need to combine these actions.
mshafer-NI
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.
(approve with the suggestion that we "standardize" these)
| @@ -0,0 +1,58 @@ | |||
| name: Set up Poetry | |||
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.
proposal: we move this into a "ni/gh-actions" repo
| @@ -0,0 +1,18 @@ | |||
| name: Set up Python | |||
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.
proposal: we move this into a "ni/gh-actions" repo
| using: composite | ||
| steps: | ||
| - name: Set up Python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 |
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.
Would it be possible to have Renovate auto-update this??
| shell: bash | ||
| - name: Cache poetry | ||
| id: cache-poetry | ||
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 |
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.
Can Renovate auto-update this?
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.
Yes, it can even convert @v4 to this format:
https://docs.renovatebot.com/presets-helpers/#helperspingithubactiondigeststosemver
|
I moved these actions to https://github.com/ni/python-actions/ and updated this repo to use them in #30 |
What does this Pull Request accomplish?
Create a composite action wrapper for
setup-python:Replace https://github.com/Gr1N/setup-poetry with a composite action,
setup-poetry:/opt/pipxandC:\Program Files (x86)\pipx, which cannot be overwritten byactions/cache. The workaround for this is to setPIPX_HOMEandPIPX_BIN_DIR.pylauncher, but I think this was a side effect of mixing up/and\in my environment variables.venv/binvs.venv/Scriptsand create our own symlinks.poetry env use pythonWhy should this Pull Request be merged?
This week's Poetry + virtualenv problems have me thinking about Poetry install reproducibility.
pipx inject.What testing has been done?
Many, many, PR builds