Closed brechtm closed 3 years ago
This feature will be also useful for testing old Python versions.
For now, the following hack seems to work:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- id: python-path
run: echo "::set-output name=path::$(command -v python)"
- uses: Gr1N/setup-poetry@v4
- id: poetry-path
run: echo "::set-output name=path::$(command -v poetry)"
- uses: actions/setup-python@v2
with:
python-version: 3.10-dev
- run: sed -i '1i#!${{ steps.python-path.outputs.path }}' '${{ steps.poetry-path.outputs.path }}'
- run: poetry env use 3.10
- run: poetry run python --version
- run: poetry install
For now, I'm doing some thing similar:
pip3.9 install poetry
)This way, poetry
is executed using the first-installed Python.
See my workflow for an example. In my case I just need tox and poetry anyway, and not all of the other dev dependencies listed in my pyproject.toml.
Hi, sorry for the delay with the answer. setup-poetry
action is just a simple wrapper around get-poetry.py
installation script and I want to keep it as simple as possible. So I'm sorry but unfortunately, I'm going to close this issue as won't fix.
I'm trying to run my tests with Python 3.10. However, Poetry doesn't support 3.10 yet and crashes.
Locally, I can run Poetry using another Python version than the one used for the virtualenv set up by Poetry. Is the same possible somehow with setupoetry?