From 02bc34ab1daf83d0fafa600b57b1ce55e71014eb Mon Sep 17 00:00:00 2001 From: Stefano Apostolico Date: Fri, 11 Oct 2024 15:20:37 +0200 Subject: [PATCH] cache CI venv --- .github/workflows/test.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eff888d..519c9b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,7 +71,6 @@ jobs: uses: actions/cache/restore@v4 with: path: | - .cache-uv/ .venv/ key: ${{ matrix.python-version }}-${{matrix.django-version}}-${{ hashFiles('pyproject.toml') }}-venv @@ -82,10 +81,11 @@ jobs: - name: Test continue-on-error: false run: | + python3 -m venv .venv uv export -q --no-hashes -o requirements.txt - pip install -r requirements.txt - pip install django==${{matrix.django-version}} - pytest tests --create-db --cov --junit-xml junit-${{ matrix.python-version }}-${{matrix.django-version}}.xml + .venv/bin/pip install -r requirements.txt + .venv/bin/pip install django==${{matrix.django-version}} + .venv/bin/pytest tests --create-db --cov --junit-xml junit-${{ matrix.python-version }}-${{matrix.django-version}}.xml - name: Cache venv if: steps.cache-venv-restore.outputs.cache-hit != 'true' @@ -93,7 +93,6 @@ jobs: uses: actions/cache/save@v4 with: path: | - .cache-uv/ .venv/ key: ${{ matrix.python-version }}-${{matrix.django-version}}-${{ hashFiles('pyproject.toml') }}-venv