Skip to content

Make use of restore-keys #5

@DMRobertson

Description

@DMRobertson

If we don't have a cache-hit for the poetry-managed venv, we'll end up recreating it from scratch. We could save a little bit of time by restoring from a different cache with a similar name.

We could probably make use of restore-keys here:

- name: Restore/cache poetry venv
id: poetry-venv-cache
uses: actions/cache@v2
with:
path: ${{ steps.poetry-venvs.outputs.dir }}
key: poetry-venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ inputs.extras }}

Probably restore-keys: poetry-venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}?

Would need to test it by making a small change to the lockfile and seeing if we modify a cached venv rather than recreating it from scratch. Or we could just make the change and YOLO it.

Either way, it's one for the wishlist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions