Skip to content

Commit

Permalink
run uv in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasertl committed Dec 1, 2024
1 parent d5404da commit 7503ab4
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,24 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Apply caching of dependencies
uses: actions/cache@v4.0.0
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
path: ~/.cache/pip
key: os=${{ matrix.os }}-python=${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements-*.txt') }}
enable-cache: true
cache-dependency-glob: "requirements**.txt"

- name: Install dependencies
run: |
pip install -U pip setuptools wheel
pip install -r requirements.txt -r requirements/requirements-test.txt django~=${{ matrix.django-version }} cryptography~=${{ matrix.cryptography-version }} pydantic~=${{ matrix.pydantic-version }}
uv pip install --system -U setuptools wheel
uv pip install --system -r requirements.txt -r requirements/requirements-test.txt django~=${{ matrix.django-version }} cryptography~=${{ matrix.cryptography-version }} pydantic~=${{ matrix.pydantic-version }}
- name: Initialize demo
run: python dev.py init-demo

- name: Run tests
run: pytest -v --cov-report term-missing --durations=20

# Prune cache, see:
# https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration
- name: Prune uv cache
run: uv cache prune --ci

0 comments on commit 7503ab4

Please sign in to comment.