From 19b9b9da2341c88a04932187d8b247f7a4d22aab Mon Sep 17 00:00:00 2001 From: Matt Aitchison Date: Wed, 25 Feb 2026 16:23:45 -0600 Subject: [PATCH] ci: drop artifact approach, use setup-uv caching directly tar czf on the venv was taking too long (gzip is single-threaded). Simpler approach: each test job installs with setup-uv's built-in cache. With warm cache, uv sync --frozen takes ~10-15s which is faster than tar + upload + download + extract. --- .github/workflows/tests.yml | 46 ++++--------------------------------- 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 214c5f2f5..46095425d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,41 +27,9 @@ jobs: echo 'python-versions=["3.12","3.13"]' >> "$GITHUB_OUTPUT" fi - install: - name: install (py${{ matrix.python-version }}) - needs: configure - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ${{ fromJSON(needs.configure.outputs.python-versions) }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install uv - uses: astral-sh/setup-uv@v6 - with: - version: "0.8.4" - python-version: ${{ matrix.python-version }} - enable-cache: true - - - name: Install the project - run: uv sync --all-groups --all-extras --frozen - - - name: Package virtualenv - run: tar czf /tmp/venv.tar.gz .venv - - - name: Upload virtualenv - uses: actions/upload-artifact@v4 - with: - name: venv-py${{ matrix.python-version }} - path: /tmp/venv.tar.gz - retention-days: 1 - compression-level: 0 - tests: name: tests (py${{ matrix.python-version }}, ${{ matrix.group }}/4) - needs: [configure, install] + needs: configure runs-on: ubuntu-latest timeout-minutes: 10 strategy: @@ -80,16 +48,10 @@ jobs: with: version: "0.8.4" python-version: ${{ matrix.python-version }} - enable-cache: false + enable-cache: true - - name: Download virtualenv - uses: actions/download-artifact@v4 - with: - name: venv-py${{ matrix.python-version }} - path: /tmp - - - name: Restore virtualenv - run: tar xzf /tmp/venv.tar.gz + - name: Install the project + run: uv sync --all-groups --all-extras --frozen - name: Restore test durations uses: actions/cache/restore@v4