Skip to content

Commit 5b5ae49

Browse files
committed
ci: Use exact Python version for venv cache
1 parent d320d7d commit 5b5ae49

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/checks.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ jobs:
1919
uses: actions/setup-python@v2
2020
with:
2121
python-version: ${{ matrix.python }}
22+
23+
- name: Get Python Version
24+
id: get_python_version
25+
run: echo "::set-output name=python_version::$(python --version)"
26+
2227
- name: Cache dependencies
2328
uses: actions/cache@v2
2429
with:
2530
path: .venv
26-
key: ${{ runner.os }}-${{ matrix.python }}-dependencies-${{ hashFiles('**/poetry.lock') }}
31+
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies-${{ hashFiles('**/poetry.lock') }}
2732
restore-keys: |
28-
${{ runner.os }}-${{ matrix.python }}-dependencies
33+
${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies
2934
- name: Install Poetry
3035
run: pip install poetry
3136

0 commit comments

Comments
 (0)