mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-14 21:52:56 +08:00
* ✨ 新增Pyright Lint工作流 * ✨ 新增Ruff Lint工作流 * 👷 添加pydanitc矩阵 * 👷 添加手动触发支持 --------- Co-authored-by: BalconyJH <balconyjh@gmail.com>
41 lines
911 B
YAML
41 lines
911 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 }}
|
|
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
|