Skip to content

Commit

Permalink
updated gihub actions to cache uv deps
Browse files Browse the repository at this point in the history
  • Loading branch information
fullerzz committed Aug 24, 2024
1 parent 6673d1d commit 415e0ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
matrix:
python-version: ["3.11", "3.12"]

env:
# Configure a constant location for the uv cache
UV_CACHE_DIR: /tmp/.uv-cache

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -34,8 +38,8 @@ jobs:
id: cached-uv-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }}
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }}
- name: Install dependencies
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
run: |
Expand All @@ -55,3 +59,5 @@ jobs:
mv tests/testing.env .env
source .venv/bin/activate
bash -c scripts/test.sh
- name: Minimize uv cache
run: uv cache prune --ci
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _user() -> None:
password="testpassword", # type: ignore # noqa: S106
email="[email protected]",
full_name="John Smith",
) # type: ignore
)
client.add_user(user)


Expand Down

0 comments on commit 415e0ff

Please sign in to comment.