Skip to content

Commit

Permalink
Only hash ./poetry.lock to compute the cache key for venvs (#19)
Browse files Browse the repository at this point in the history
This avoids the post run step failing when a test creates unreadable
files or directories within the working directory.

Signed-off-by: Sean Quah <seanq@matrix.org>
  • Loading branch information
squahtx authored Apr 13, 2023
1 parent 73f6764 commit 8fe7cb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ runs:
uses: actions/cache@v3
with:
path: ${{ steps.poetry-venvs.outputs.dir }}
key: poetry-venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ inputs.extras }}
key: poetry-venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}-${{ inputs.extras }}

- name: Check that the poetry lockfile is up to date
# This is rather hacky. We look for the warning message in poetry's
Expand Down

0 comments on commit 8fe7cb1

Please sign in to comment.