Skip to content

CI cache key should include Python version #743

@abrookins

Description

@abrookins

Summary

The CI cache key for the test matrix doesn't include the Python version, causing all Python versions to share the same .venv cache. This can cause issues because Poetry installs Python-version-specific files into .venv.

Current behavior

key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

All Python versions (3.9, 3.10, 3.11, 3.12, 3.13, pypy-3.9, pypy-3.10) share the same cache.

Expected behavior

key: venv-${{ runner.os }}-${{ matrix.pyver }}-${{ hashFiles('**/poetry.lock') }}

Each Python version gets its own cache.

Location

.github/workflows/ci.yml - the test job cache key (around line 123)

Prior work

PR #479 attempted this fix but was closed due to staleness. See also #473.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions