Skip to content
Closed
Changes from all commits
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
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,28 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5

- name: Cache uv download cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-py3.11-uv-cache-${{ hashFiles('pyproject.toml', 'uv.lock') }}
restore-keys: |
${{ runner.os }}-py3.11-uv-cache-

- name: Cache .venv
id: cache-venv
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: .venv
# Strict key only — no restore-keys, since pip/uv installs don't
# reliably prune removed deps and a stale venv breaks builds.
key: ${{ runner.os }}-py3.11-venv-${{ hashFiles('pyproject.toml', 'uv.lock') }}

- name: Set up Python 3.11
run: uv python install 3.11

- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
uv venv .venv --python 3.11
source .venv/bin/activate
Expand All @@ -63,10 +81,28 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5

- name: Cache uv download cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-py3.11-uv-cache-${{ hashFiles('pyproject.toml', 'uv.lock') }}
restore-keys: |
${{ runner.os }}-py3.11-uv-cache-

- name: Cache .venv
id: cache-venv
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: .venv
# Strict key only — no restore-keys, since pip/uv installs don't
# reliably prune removed deps and a stale venv breaks builds.
key: ${{ runner.os }}-py3.11-venv-${{ hashFiles('pyproject.toml', 'uv.lock') }}

- name: Set up Python 3.11
run: uv python install 3.11

- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
uv venv .venv --python 3.11
source .venv/bin/activate
Expand Down