File tree Expand file tree Collapse file tree 1 file changed +25
-6
lines changed
.github/actions/python-environment Expand file tree Collapse file tree 1 file changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -13,21 +13,40 @@ inputs:
1313 required : true
1414 default : " 2.1.2"
1515
16+ extras :
17+ description : ' Comma-separated list of extras'
18+ required : false
19+
1620runs :
1721
1822 using : " composite"
1923 steps :
2024
21- - name : Setup Poetry (${{ inputs.poetry-version }})
22- run : pipx install poetry==${{ inputs.poetry-version }}
23- shell : bash
24-
2525 - name : Setup Python (${{ inputs.python-version}})
2626 uses : actions/setup-python@v5
2727 with :
2828 python-version : ${{ inputs.python-version }}
2929 cache : ' poetry'
3030
31- - name : Poetry install
32- run : poetry install
31+ - name : Setup up pipx if not present
32+ shell : bash
33+ run : |
34+ if ! command -v pipx >/dev/null 2>&1; then
35+ python -m pip install --upgrade pip
36+ python -m pip install pipx
37+ pipx ensurepath
38+ fi
39+
40+ - name : Setup Poetry (${{ inputs.poetry-version }})
41+ run : pipx install poetry==${{ inputs.poetry-version }}
42+ shell : bash
43+
44+ - name : Poetry install with extras
45+ run : |
46+ EXTRAS=$(echo "${{ inputs.extras }}" | tr -d ' ')
47+ if [[ -n "$EXTRAS" ]]; then
48+ poetry install --with "$EXTRAS"
49+ else
50+ poetry install
51+ fi
3352 shell : bash
You can’t perform that action at this time.
0 commit comments