Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gh-86275: Cache Hypothesis' db in CI
  • Loading branch information
Zac-HD committed May 20, 2023
commit 59a2793f4b082522f6693c74824bc081237dc7ad
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ jobs:
echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV
echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV
./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -U hypothesis
- name: 'Restore Hypothesis database'
id: cache-hypothesis-database
uses: actions/cache@v3
with:
path: ./hypothesis
key: hypothesis-database-${{ github.head_ref || github.run_id }}
restore-keys:
- hypothesis-database-
Comment thread
Zac-HD marked this conversation as resolved.
Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zac-HD did you mean to keep that leading hyphen?

Copy link
Copy Markdown
Member

@webknjaz webknjaz Jul 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it look up the '- hypothesis-database-' prefix, and I'm pretty sure you wanted 'hypothesis-database-':

Cache not found for input keys: hypothesis-database-9927179210, - hypothesis-database-

(https://github.com/python/cpython/actions/runs/9927179210/job/27421821417#step:21:24)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zac-HD here's the fix: #121756

- name: "Run tests"
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: |
Expand Down