Closed johanneszellinger closed 5 months ago
Not sure about the windows problem, if that comes first, or is definitely related.
GH Actions [ on GH hosted runners ] comes preinstalled with software. If you're using self-hosted runner, why not have those runners already have the things [ like pipx ] installed for you, so you aren't installing on each run?
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
Thanks for the fast response! :) I don't think Windows is the issue here, all our runners are Linux based. The thing is, the runners are actually Kubernetes PODs which are spun up for each triggered action and destroyed afterwards. Since these are used by many of my colleagues for very different use cases we have to install all we need on the fly, unfortunately.
Actually, am leaning towards closing this issue -- pipx
comes by default with the default GitHub actions, which is why it is believed to be there [ assumed 'dependency' ]. Therefore, I should probably update docs to that pipx is a requirement of this action. As an alternative, we could probably add some additional logic in the action to run relevant commands in other ways and/or install pipx if it doesn't already exist.
I have the same issue on GitHub enterprise runners, which also do not seem to have pipx installed by default. Would be great if the ruff action could include this as a required dependency.
I agree it would be nice if pipx
could be installed by the action. Our org uses self-hosted runners which do not (yet) have pipx
installed upon them. Its easily worked around using
- name: Install pipx # required dependency for chartboost/ruff-action
run: python -m pip install --upgrade pip pipx
but it would be more elegant if I didn't have to.
I expect most users have pipx either installed on their self-hosted runner. Otherwise, I can't even assume all users have pip. It would be hard to extend to address ALL of the scenarios that might be needed to get the required dependencies. It would also be silly to install pipx again, if it were already installed [ would slow down existing users ].
Marking this as closed. But, would be happy to continue discussion on a new issue/design-doc [ if anyone wants to create ] towards determining whether there are sane ways to address this while also not bloating this targeted/limited-purpose GH Action.
I have the following workflow yml:
Which will lead to the following error:
Which seems to be fixed by changing the step before running ruff to
Not sure if I even should install pipx, but in any case, shouldn't the whole setup be done by the github action anyway? Apart from that the action seems to run perfectly fine (it fails telling me about all my code issues :D ).