Skip to content

Commit bd54071

Browse files
committed
chore: attempt to speed up tests
1 parent 86b38d0 commit bd54071

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/unittest.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ jobs:
4141
- name: Install nox
4242
run: |
4343
uv pip install --system nox nox-uv
44+
# Caches compiled wheels locally to prevent building heavy libraries
45+
# such as grpcio, which we build from scratch on every run for Python 3.15+.
46+
# Follow https://github.com/grpc/grpc/issues/41010 for updates.
47+
- name: Cache Built Python 3.15 Wheels
48+
if: matrix.python == '3.15'
49+
uses: actions/cache@v4
50+
with:
51+
path: .uv-wheel-cache
52+
key: ${{ runner.os }}-uv-wheels-3.15-${{ hashFiles('packages/**/testing/constraints*.txt') }}
53+
restore-keys: |
54+
${{ runner.os }}-uv-wheels-3.15-
4455
- name: Run unit tests
4556
env:
4657
COVERAGE_FILE: ${{ github.workspace }}/.coverage-${{ matrix.python }}
@@ -58,6 +69,8 @@ jobs:
5869
if [ "${{ matrix.python }}" = "3.15" ]; then
5970
export NOX_FORCE_VENV_BACKEND="venv"
6071
export VIRTUALENV_SEEDER=""
72+
# Route uv cache to our persistent workspace directory
73+
export UV_CACHE_DIR="${{ github.workspace }}/.uv-wheel-cache"
6174
fi
6275
ci/run_conditional_tests.sh
6376
- name: Upload coverage results

0 commit comments

Comments
 (0)