From 4bcd77452dc3a94b1bf7a91c5842034d8a5051c5 Mon Sep 17 00:00:00 2001 From: Dan Snow Date: Mon, 2 Dec 2024 13:29:44 -0600 Subject: [PATCH] Add env cache --- .github/workflows/python-build-and-test.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-build-and-test.yaml b/.github/workflows/python-build-and-test.yaml index 47b025e..74e3461 100644 --- a/.github/workflows/python-build-and-test.yaml +++ b/.github/workflows/python-build-and-test.yaml @@ -9,6 +9,8 @@ name: python-build-and-test jobs: build-and-test: runs-on: ubuntu-latest + env: + UV_CACHE_DIR: ${{ env.RUNNER_TEMP }}/setup-uv-cache strategy: fail-fast: false matrix: @@ -23,6 +25,7 @@ jobs: with: enable-cache: true cache-dependency-glob: pyproject.toml + cache-local-path: ${{ env.UV_CACHE_DIR }} cache-suffix: tox - name: Setup Python ${{ matrix.python-version }} @@ -41,4 +44,8 @@ jobs: - name: Run tox test suite shell: bash - run: tox run --skip-pkg-install + run: tox run -vv --skip-pkg-install + + # https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration + # - name: Minimize uv cache + # run: uv cache prune --ci