Skip to content

Commit

Permalink
cache CI venv
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Oct 11, 2024
1 parent 8f214fe commit 02bc34a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -82,18 +81,18 @@ 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'
id: cache-venv-save
uses: actions/cache/save@v4
with:
path: |
.cache-uv/
.venv/
key: ${{ matrix.python-version }}-${{matrix.django-version}}-${{ hashFiles('pyproject.toml') }}-venv

Expand Down

0 comments on commit 02bc34a

Please sign in to comment.