mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-06 20:06:12 +08:00
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
name: Setup Python
|
|
description: Setup Python
|
|
|
|
inputs:
|
|
python-version:
|
|
description: Python version
|
|
required: false
|
|
default: "3.9"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ inputs.python-version }}
|
|
|
|
- name: Install poetry
|
|
uses: Gr1N/setup-poetry@v7
|
|
|
|
- name: Cache Windows dependencies
|
|
uses: actions/cache@v2
|
|
if: ${{ runner.os == 'Windows' }}
|
|
with:
|
|
path: ~/AppData/Local/pypoetry/Cache/virtualenvs
|
|
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
|
|
|
- name: Cache Linux dependencies
|
|
uses: actions/cache@v2
|
|
if: ${{ runner.os == 'Linux' }}
|
|
with:
|
|
path: ~/.cache/pypoetry/virtualenvs
|
|
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
|
|
|
- name: Cache macOS dependencies
|
|
uses: actions/cache@v2
|
|
if: ${{ runner.os == 'macOS' }}
|
|
with:
|
|
path: ~/Library/Caches/pypoetry/virtualenvs
|
|
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }} |