Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions .github/actions/python-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,40 @@ inputs:
required: true
default: "2.1.2"

extras:
description: 'Comma-separated list of extras'
required: false

runs:

using: "composite"
steps:

- name: Setup Poetry (${{ inputs.poetry-version }})
run: pipx install poetry==${{ inputs.poetry-version }}
shell: bash

- name: Setup Python (${{ inputs.python-version}})
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'poetry'

- name: Poetry install
run: poetry install
- name: Setup up pipx if not present
shell: bash
run: |
python3 m pip install --upgrade pipx
pipx ensurepath
echo "$Home/.local/bin" >> $GITHUB_PATH


- name: Setup Poetry (${{ inputs.poetry-version }})
run: |
pipx install poetry==${{ inputs.poetry-version }}
shell: bash

- name: Poetry install with extras
run: |
EXTRAS=$(echo "${{ inputs.extras }}" | tr -d ' ')
if [[ -n "$EXTRAS" ]]; then
poetry install --extras "$EXTRAS"
else
poetry install
fi
shell: bash
Loading