Skip to content

Commit a7a557c

Browse files
committed
ci: key venv cache on resolved python patch version
1 parent 8b1e1cd commit a7a557c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
- name: Install poetry
8585
run: uv tool install poetry
8686
- name: Set up Python
87+
id: setup-python
8788
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v5
8889
with:
8990
python-version: ${{ matrix.python-version }}
@@ -96,7 +97,7 @@ jobs:
9697
path: |
9798
.venv
9899
src/zeroconf/**/*.so
99-
key: venv-v1-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.extension }}-${{ hashFiles('poetry.lock', 'pyproject.toml', 'build_ext.py', 'src/zeroconf/**/*.py', 'src/zeroconf/**/*.pxd') }}
100+
key: venv-v1-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ matrix.extension }}-${{ hashFiles('poetry.lock', 'pyproject.toml', 'build_ext.py', 'src/zeroconf/**/*.py', 'src/zeroconf/**/*.pxd') }}
100101
- name: Install Dependencies no cython
101102
if: ${{ matrix.extension == 'skip_cython' && steps.cache-venv.outputs.cache-hit != 'true' }}
102103
env:
@@ -119,6 +120,7 @@ jobs:
119120
steps:
120121
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
121122
- name: Setup Python 3.13
123+
id: setup-python
122124
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v5
123125
with:
124126
python-version: 3.13
@@ -135,7 +137,7 @@ jobs:
135137
path: |
136138
.venv
137139
src/zeroconf/**/*.so
138-
key: venv-v1-${{ runner.os }}-benchmark-py3.13-${{ hashFiles('poetry.lock', 'pyproject.toml', 'build_ext.py', 'src/zeroconf/**/*.py', 'src/zeroconf/**/*.pxd') }}
140+
key: venv-v1-${{ runner.os }}-benchmark-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock', 'pyproject.toml', 'build_ext.py', 'src/zeroconf/**/*.py', 'src/zeroconf/**/*.pxd') }}
139141
- name: Install Dependencies
140142
if: steps.cache-venv.outputs.cache-hit != 'true'
141143
run: |

0 commit comments

Comments
 (0)