Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: 使用 setup-python 自带的缓存功能 #1010

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/actions/setup-python/action.yml
Expand Up @@ -10,17 +10,19 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}
architecture: "x64"
- name: Install poetry
shell: bash
run: pipx install poetry --pip-args=--pre

- uses: Gr1N/setup-poetry@v7
- name: Config poetry
shell: bash
run: poetry config virtualenvs.prefer-active-python true

- uses: actions/cache@v2
- uses: actions/setup-python@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
python-version: ${{ inputs.python-version }}
architecture: "x64"
cache: 'poetry'

- run: poetry install -E all
shell: bash