From 7e38448cc9ac11ccadcb4d2972d8376bc2c4ebf9 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Mon, 21 Apr 2025 04:22:55 +0200 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c119d46..4baa6f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,9 @@ jobs: strategy: matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.10'] + env: + # Configure a constant location for the uv cache + UV_CACHE_DIR: /tmp/.uv-cache steps: - uses: actions/checkout@v4 @@ -30,9 +33,14 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: 'pip' - cache-dependency-path: | - pyproject.toml + - 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 }} - uses: hoverkraft-tech/compose-action@v2.0.2 with: compose-file: "./docker-compose.yml" @@ -46,6 +54,8 @@ jobs: run: | make test make services-down + - name: Minimize uv cache + run: uv cache prune --ci - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 with: