Replies: 1 comment
-
For GitHub actions users: As of yesterday, steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v3
with:
python-version: '3.9'
cache: 'poetry'
- run: poetry install
- run: poetry run pytest If you see this via Google / Search and use gh actions, please search the tracker in case this ever changes. See also: #4205 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue
I have setup a GitHub Actions workflow for a Pelican plugin, using
poetry
as a dependency manager:https://github.com/pelican-plugins/linkbacks/blob/master/.github/workflows/continuous-integration-workflow.yml
I have a special constraint: I need to install
pelican
in editable mode, to gain access to itstests.support
package. Because currentlypoetry
does not support to install dependencies in editable mode, I install mydev
dependencies through adev-requirements.txt
file.My approach works, but is a bit clunky:
poetry
stores its dependencies in avirtualenv
, I need 2 caching steps for both~/.cache/pip
&~/.local/share/virtualenvs
directoriespylint
,py.test
or installdev-requirements.txt
, I need to either prefix all commands bypoetry run
or else callsource $(poetry env info --path)/bin/activate
poetry run
is fine, but in a multi-lines workflow-step, where several commands would need to be executed in the virtualenv, entering it once can quickly becomes more efficient and less verbose IMHOThe whole workflow feels verbose and a bit cumbersome.
Would you please have any suggestion to improve this using
poetry
?And a more specific questions: are
poetry
developpers considering a no-virtualenv option, to install dependencies in~/.cache/pip
, which would make caching dependencies directories simpler in the case of a CI workflow, where there is not a need for virtual environments ?Beta Was this translation helpful? Give feedback.
All reactions