File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,20 @@ jobs:
179179 submodules : recursive
180180 fetch-depth : 0 # fetch all history for all branches and tags
181181 # poetry-dynamic-versioning needs git tags to produce the correct version number
182+ - name : Setup Python
183+ if : ${{ runner.os == 'Linux' }}
184+ run : |
185+ # Use pyenv to install Python version that is not available via `actions/setup-python`
186+ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
187+ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
188+ echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
189+ echo 'eval "$(pyenv init - bash)"' >> ~/.bashrc
190+ pyenv install $PYTHON_VERSION
191+ pyenv global $PYTHON_VERSION
192+ env :
193+ PYTHON_VERSION : ${{ matrix.python_version }}
182194 - uses : actions/setup-python@v5
195+ if : ${{ runner.os != 'Linux' }}
183196 with :
184197 python-version : ${{ matrix.python_version }}
185198 - name : Setup Poetry
You can’t perform that action at this time.
0 commit comments