From 5e45f305ac71117a453c711a2b75e3366d5e7ec9 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 13 Nov 2021 14:52:42 -0800 Subject: [PATCH] Use full Python version for GitHub Actions cache key (#1373) --- .github/workflows/testing.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 63e50ea2..27d839f2 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -45,11 +45,14 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: poetry cache # Change CACHE_STRING secret to bust the cache. Useful with minor Python version changes. + - name: Capture full Python version in env + run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV + + - name: poetry cache # Change CACHE_STRING secret to bust the cache uses: actions/cache@v2 with: path: .venv - key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-${{ secrets.CACHE_STRING }} + key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ secrets.CACHE_STRING }} - name: Install dependencies run: |