mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-18 17:35:46 +08:00
bbd13c04cc
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
42 lines
939 B
YAML
42 lines
939 B
YAML
name: Setup Python
|
|
description: Setup Python
|
|
|
|
inputs:
|
|
python-version:
|
|
description: Python version
|
|
required: false
|
|
default: "3.10"
|
|
env-dir:
|
|
description: Environment directory
|
|
required: false
|
|
default: "."
|
|
no-root:
|
|
description: Do not install package in the environment
|
|
required: false
|
|
default: "false"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Install poetry
|
|
run: pipx install poetry
|
|
shell: bash
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ inputs.python-version }}
|
|
architecture: "x64"
|
|
cache: "poetry"
|
|
cache-dependency-path: |
|
|
./poetry.lock
|
|
${{ inputs.env-dir }}/poetry.lock
|
|
|
|
- run: |
|
|
cd ${{ inputs.env-dir }}
|
|
if [ "${{ inputs.no-root }}" = "true" ]; then
|
|
poetry install --all-extras --no-root
|
|
else
|
|
poetry install --all-extras
|
|
fi
|
|
shell: bash
|