Skip to content

Commit e5dd9e1

Browse files
authored
Update main.yml (#286)
1 parent 0db7474 commit e5dd9e1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/main.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,24 @@ jobs:
2323
strategy:
2424
matrix:
2525
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.10']
26+
env:
27+
# Configure a constant location for the uv cache
28+
UV_CACHE_DIR: /tmp/.uv-cache
2629

2730
steps:
2831
- uses: actions/checkout@v4
2932
- name: Set up Python ${{ matrix.python-version }}
3033
uses: actions/setup-python@v5
3134
with:
3235
python-version: ${{ matrix.python-version }}
33-
cache: 'pip'
34-
cache-dependency-path: |
35-
pyproject.toml
36+
- name: Restore uv cache
37+
uses: actions/cache@v4
38+
with:
39+
path: /tmp/.uv-cache
40+
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
41+
restore-keys: |
42+
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
43+
uv-${{ runner.os }}
3644
- uses: hoverkraft-tech/[email protected]
3745
with:
3846
compose-file: "./docker-compose.yml"
@@ -46,6 +54,8 @@ jobs:
4654
run: |
4755
make test
4856
make services-down
57+
- name: Minimize uv cache
58+
run: uv cache prune --ci
4959
- name: Upload coverage reports to Codecov
5060
uses: codecov/codecov-action@v5
5161
with:

0 commit comments

Comments
 (0)