⬆️ Migrate to uv (#1688)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
Jonathan Ehwald
2026-01-04 20:54:22 +01:00
committed by GitHub
parent f0d4d4b51f
commit 00754c4dee
17 changed files with 2617 additions and 106 deletions

View File

@@ -19,7 +19,7 @@ on:
- cron: "0 0 * * 1"
env:
UV_SYSTEM_PYTHON: 1
UV_NO_SYNC: true
jobs:
test:
@@ -42,6 +42,8 @@ jobs:
python-version: "3.13"
fail-fast: false
runs-on: ${{ matrix.os }}
env:
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v6
- name: Set up Python
@@ -51,11 +53,10 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.4.15"
enable-cache: true
cache-dependency-glob: |
requirements**.txt
pyproject.toml
uv.lock
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
@@ -63,10 +64,10 @@ jobs:
with:
limit-access-to-actor: true
- name: Install Dependencies
run: uv pip install -r requirements-tests.txt
run: uv sync --locked --no-dev --group tests
- run: mkdir coverage
- name: Test
run: bash scripts/test.sh
run: uv run bash scripts/test.sh
env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }}
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
@@ -85,15 +86,14 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.13'
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.4.15"
enable-cache: true
cache-dependency-glob: |
requirements**.txt
pyproject.toml
uv.lock
- name: Get coverage files
uses: actions/download-artifact@v7
with:
@@ -101,17 +101,17 @@ jobs:
path: coverage
merge-multiple: true
- name: Install Dependencies
run: uv pip install -r requirements-tests.txt
run: uv sync --locked --no-dev --group tests
- run: ls -la coverage
- run: coverage combine coverage
- run: coverage html --title "Coverage for ${{ github.sha }}"
- run: uv run coverage combine coverage
- run: uv run coverage html --title "Coverage for ${{ github.sha }}"
- name: Store coverage HTML
uses: actions/upload-artifact@v6
with:
name: coverage-html
path: htmlcov
include-hidden-files: true
- run: coverage report --fail-under=99
- run: uv run coverage report --fail-under=99
# https://github.com/marketplace/actions/alls-green#why
alls-green: # This job does nothing and is only used for the branch protection