From 6f6c4267fa54dfc883b37d6e8168e868e0042f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Krzy=C5=9Bk=C3=B3w?= Date: Tue, 13 Feb 2024 18:39:23 +0100 Subject: [PATCH] Fix CI venv caching --- .github/workflows/dev.build.yml | 3 ++- .github/workflows/master.build.yml | 3 ++- .github/workflows/pull.request.yml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev.build.yml b/.github/workflows/dev.build.yml index ace75b0b28..fa63b51bf8 100644 --- a/.github/workflows/dev.build.yml +++ b/.github/workflows/dev.build.yml @@ -21,6 +21,7 @@ jobs: # 0 is needed for the update time plugin to work properly fetch-depth: 0 - name: Install Python + id: install-python uses: actions/setup-python@v5 with: python-version: 3.12 @@ -30,7 +31,7 @@ jobs: uses: actions/cache@v4 with: path: venv - key: requirements-${{ hashFiles('requirements*.txt') }} + key: requirements-${{ steps.install-python.outputs.python-version }}-${{ hashFiles('requirements*.txt') }} - name: Install Uncached Requirements if: steps.cache-requirements.outputs.cache-hit != 'true' run: | diff --git a/.github/workflows/master.build.yml b/.github/workflows/master.build.yml index a78e9bb751..69a6f19a67 100644 --- a/.github/workflows/master.build.yml +++ b/.github/workflows/master.build.yml @@ -20,6 +20,7 @@ jobs: # 0 is needed for the update time plugin to work properly fetch-depth: 0 - name: Install Python + id: install-python uses: actions/setup-python@v5 with: python-version: 3.12 @@ -29,7 +30,7 @@ jobs: uses: actions/cache@v4 with: path: venv - key: requirements-${{ hashFiles('requirements*.txt') }} + key: requirements-${{ steps.install-python.outputs.python-version }}-${{ hashFiles('requirements*.txt') }} - name: Install Uncached Requirements if: steps.cache-requirements.outputs.cache-hit != 'true' run: | diff --git a/.github/workflows/pull.request.yml b/.github/workflows/pull.request.yml index 4164073b0c..e2c7f96e37 100644 --- a/.github/workflows/pull.request.yml +++ b/.github/workflows/pull.request.yml @@ -20,6 +20,7 @@ jobs: # 0 is needed for the update time plugin to work properly fetch-depth: 1 - name: Install Python + id: install-python uses: actions/setup-python@v5 with: python-version: 3.12 @@ -29,7 +30,7 @@ jobs: uses: actions/cache@v4 with: path: venv - key: requirements-${{ hashFiles('requirements*.txt') }} + key: requirements-${{ steps.install-python.outputs.python-version }}-${{ hashFiles('requirements*.txt') }} - name: Install Uncached Requirements if: steps.cache-requirements.outputs.cache-hit != 'true' run: |