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 c0583e6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 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: /uv-cache

steps:
- uses: actions/checkout@v4

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

- name: Restore uv cache
uses: actions/cache@v4
with:
path: /uv-cache
key: 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 c0583e6

Please sign in to comment.