From 4fe264dcadc3a7a8dc2d0fe78999a228af98e0d0 Mon Sep 17 00:00:00 2001 From: Sean Quah Date: Thu, 13 Apr 2023 11:39:09 +0100 Subject: [PATCH] Only hash ./poetry.lock to compute the cache key for venvs This avoids the post run step failing when a test creates unreadable files or directories within the working directory. Signed-off-by: Sean Quah --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9733181..22983ce 100644 --- a/action.yml +++ b/action.yml @@ -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