forked from python-poetry/poetry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ac132a
commit 2fc5e78
Showing
4 changed files
with
107 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Bootstrap Poetry | ||
description: Configure the environment with the specified Python and Poetry version. | ||
|
||
inputs: | ||
python-version: | ||
description: Desired Python version | ||
default: "3.12" | ||
python-latest: | ||
description: Use an uncached Python if a newer match is available | ||
default: 'false' | ||
poetry-spec: | ||
description: pip-compatible installation specification to use for Poetry | ||
default: 'poetry' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# Enable handling long path names (+260 char) on the Windows platform | ||
# https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation | ||
- id: git-config-longpaths | ||
if: matrix.os == 'Windows' | ||
run: git config --system core.longpaths true | ||
|
||
- id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
check-latest: ${{ inputs.python-latest == 'true' }} | ||
cache: poetry | ||
|
||
- id: pipx-poetry | ||
run: pipx install --python '${{ steps.setup-python.outputs.python-path }}' '${{ inputs.poetry-spec }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Poetry Install | ||
description: Install the project using Poetry, optionally changing defaults | ||
|
||
inputs: | ||
in-project: | ||
description: Set virtualenvs.in-project | ||
default: 'true' | ||
no-pip: | ||
description: Set virtualenvs.options.no-pip | ||
default: 'true' | ||
no-setuptools: | ||
description: Set virtualenvs.options.no-setuptools | ||
default: 'true' | ||
no-root: | ||
description: Use `poetry install --no-root` | ||
default: 'false' | ||
only-root: | ||
description: Use `poetry install --only-root` | ||
default: 'false' | ||
extras: | ||
description: Extras for `poetry install --extras` | ||
groups-with: | ||
description: Groups for `poetry install --with` | ||
groups-without: | ||
description: Groups for `poetry install --without` | ||
groups-only: | ||
description: Groups for `poetry install --only` | ||
directory: | ||
description: Directory for `poetry install --directory` | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- id: poetry-config | ||
run: | | ||
poetry config virtualenvs.in-project ${{ inputs.in-project }} | ||
poetry config virtualenvs.options.no-pip ${{ inputs.no-pip }} | ||
poetry config virtualenvs.options.no-setuptools ${{ inputs.no-setuptools }} | ||
- id: poetry-install | ||
run: | | ||
poetry install \ | ||
${{ inputs.no-root == 'true' && '--no-root' }} \ | ||
${{ inputs.only-root == 'true' && '--only-root' }} \ | ||
${{ inputs.extras && format("--extras='{0}'", inputs.extras) }} \ | ||
${{ inputs.groups-with && format("--with='{0}'", inputs.groups-with) }} \ | ||
${{ inputs.groups-without && format("--without='{0}'", inputs.groups-without) }} \ | ||
${{ inputs.groups-only && format("--only='{0}'", inputs.groups-only) }} \ | ||
${{ inputs.directory && format("--directory='{0}'", inputs.directory) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters