Skip to content

Commit e8ae843

Browse files
authored
ops(workflow): use sepcific Python version in setup as venv cache key (#615)
1 parent d9507bd commit e8ae843

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/_test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ jobs:
2727
run: cargo test --verbose
2828

2929
- uses: actions/setup-python@v5
30+
id: setup_python
3031
with:
3132
python-version: ${{ matrix.python-version }}
3233
cache: 'pip'
3334
- uses: actions/cache@v4
3435
with:
3536
path: .venv
36-
key: ${{ runner.os }}-pythonenv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
37+
key: ${{ runner.os }}-pyenv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}
3738
restore-keys: |
38-
${{ runner.os }}-pythonenv-${{ matrix.python-version }}-
39+
${{ runner.os }}-pyenv-${{ steps.setup_python.outputs.python-version }}-
3940
- name: Setup venv
4041
run: |
4142
python -m venv .venv

0 commit comments

Comments
 (0)