Skip to content

Commit

Permalink
Add caching of uv dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Jul 31, 2024
1 parent c7433bc commit 231be12
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 10

env:
UV_CACHE_DIR: /tmp/.uv-cache

steps:
- uses: actions/checkout@v4

Expand All @@ -49,10 +52,22 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Restore uv cache
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install packages
run: |
uv sync --all-extras --dev
- name: Run tests
run: |
uv run -- pytest tests
- name: Minimize uv cache
run: uv cache prune --ci

0 comments on commit 231be12

Please sign in to comment.