From 0241a24bcf138d56ca588dc0cda405e6aac32f5b Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Fri, 31 Mar 2023 11:31:54 +0200 Subject: [PATCH] Never restore stale tox environment caches The installed dependencies in tox environments are no longer automatically synced using pip-tools, which means they do not update if they are stale. We should therefore never use prefix matching for the cache Action for the tox environments, or we will end up restoring a stale environment every time the requirements files change. This ensures we only restore tox environments when the cache key matches exactly - meaning that all the tox environments should be rebuilt if any of the requirements files changed. --- .github/workflows/build-and-test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 642caf37b2..54baeef258 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -29,8 +29,6 @@ jobs: with: path: .tox key: ${{ runner.os }}-tox-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt', '**/requirements/*.txt', 'tox.ini') }} - restore-keys: | - ${{ runner.os }}-tox-${{ matrix.python-version }}- - name: "Set up Python ${{ matrix.python-version }}" uses: actions/setup-python@v4