2022-01-13 16:41:01 +08:00
|
|
|
name: Setup Python
|
|
|
|
description: Setup Python
|
|
|
|
|
2022-01-13 17:58:35 +08:00
|
|
|
inputs:
|
|
|
|
python-version:
|
|
|
|
description: Python version
|
|
|
|
required: false
|
|
|
|
default: "3.9"
|
|
|
|
|
2022-01-13 16:41:01 +08:00
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2022-05-27 11:25:51 +08:00
|
|
|
- id: python
|
|
|
|
uses: actions/setup-python@v2
|
2022-01-13 16:41:01 +08:00
|
|
|
with:
|
2022-01-13 17:58:35 +08:00
|
|
|
python-version: ${{ inputs.python-version }}
|
2022-01-13 16:41:01 +08:00
|
|
|
architecture: "x64"
|
|
|
|
|
|
|
|
- uses: Gr1N/setup-poetry@v7
|
|
|
|
|
2022-05-27 11:25:51 +08:00
|
|
|
- id: poetry-cache
|
|
|
|
run: echo "::set-output name=dir::$(poetry config virtualenvs.path)"
|
|
|
|
shell: bash
|
|
|
|
|
2022-01-13 16:41:01 +08:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
2022-05-27 11:25:51 +08:00
|
|
|
path: ${{ steps.poetry-cache.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-poetry-${{ steps.python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
2022-01-13 16:41:01 +08:00
|
|
|
|
|
|
|
- run: poetry install -E all
|
|
|
|
shell: bash
|