Skip to content

Commit

Permalink
Never restore stale tox environment caches
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lunkwill42 committed Mar 31, 2023
1 parent b5597a9 commit 0241a24
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0241a24

Please sign in to comment.