diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 538b57f..479f9b0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,7 +15,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up uv - run: curl -LsSf https://astral.sh/uv/install.sh | sh + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + cache-dependency-glob: | + **/requirements*.txt + **/pyproject.toml - name: Build dist run: uv tool run --with build[uv] --from build python -m build --installer uv --sdist - name: Upload release distributions diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1f4c99d..8426ac5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,8 +8,6 @@ on: env: UV_SYSTEM_PYTHON: 1 - # Configure a constant location for the uv cache - UV_CACHE_DIR: /tmp/.uv-cache jobs: build: runs-on: ubuntu-latest @@ -19,19 +17,16 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up uv - run: curl -LsSf https://astral.sh/uv/install.sh | sh + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + cache-dependency-glob: | + **/requirements*.txt + **/pyproject.toml - name: Set up Python uses: actions/setup-python@v5 with: python-version: 3.12 - - name: Restore uv cache - uses: actions/cache@v4 - with: - path: ${{ env.UV_CACHE_DIR }} - key: uv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }} - restore-keys: | - uv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }} - uv-${{ runner.os }} - name: Install dependencies run: uv pip install nox[uv] - name: Test with pytest @@ -40,5 +35,3 @@ jobs: uses: codecov/codecov-action@v4 with: use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }} - - name: Minimize uv cache - run: uv cache prune --ci