Skip to content

Migrate Python projects from Poetry to UV #543

Migrate Python projects from Poetry to UV

Migrate Python projects from Poetry to UV #543

Workflow file for this run

on:
push:
branches: [main]
pull_request:
paths:
- "python/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install UV
uses: astral-sh/setup-uv@v4
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: selfie-lib - Install dependencies
run: uv sync --all-extras --dev
working-directory: python/selfie-lib
- name: selfie-lib - Run tests
run: uv run pytest -vv
working-directory: python/selfie-lib
- name: selfie-lib - Type check
run: uv run pyright
working-directory: python/selfie-lib
- name: selfie-lib - Lint
run: |
uv run ruff format --check
uv run ruff check
working-directory: python/selfie-lib
- name: pytest-selfie - Install dependencies
run: uv sync --all-extras --dev
working-directory: python/pytest-selfie
- name: pytest-selfie - Type check
run: uv run pyright
working-directory: python/pytest-selfie
- name: pytest-selfie - Lint
run: |
uv run ruff format --check
uv run ruff check
working-directory: python/pytest-selfie
- name: example-pytest-selfie - Install dependencies
run: uv sync --all-extras --dev
working-directory: python/example-pytest-selfie
- name: example-pytest-selfie - Run tests
run: uv run pytest -vv
working-directory: python/example-pytest-selfie
- name: example-pytest-selfie - Type check
run: uv run pyright
working-directory: python/example-pytest-selfie
- name: example-pytest-selfie - Lint
run: |
uv run ruff format --check
uv run ruff check
working-directory: python/example-pytest-selfie