nonebot2/.github/actions/setup-python/action.yml
Ju4tCode ae21bfdd0e
👷 fix python ci cache path error (#1012)
* 👷 fix python ci cache path error

* 🐛 fix path error

* ✏️ fix typo
2022-05-27 11:25:51 +08:00

32 lines
738 B
YAML

name: Setup Python
description: Setup Python
inputs:
python-version:
description: Python version
required: false
default: "3.9"
runs:
using: "composite"
steps:
- id: python
uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}
architecture: "x64"
- uses: Gr1N/setup-poetry@v7
- id: poetry-cache
run: echo "::set-output name=dir::$(poetry config virtualenvs.path)"
shell: bash
- uses: actions/cache@v2
with:
path: ${{ steps.poetry-cache.outputs.dir }}
key: ${{ runner.os }}-poetry-${{ steps.python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- run: poetry install -E all
shell: bash