Skip to content

Migrate Python projects from poetry to uv #537

Migrate Python projects from poetry to uv

Migrate Python projects from poetry to uv #537

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 and set Python version
uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
- name: selfie-lib - install dependencies
shell: bash
working-directory: python/selfie-lib
run: |
uv pip install --frozen -e .
uv pip install --frozen -r requirements.txt -r dev-requirements.txt
- name: selfie-lib - pytest
shell: bash
working-directory: python/selfie-lib
run: |
unset SELFIE || true
uv run --frozen pytest -vv
- name: selfie-lib - pyright
shell: bash
working-directory: python/selfie-lib
run: uv run --frozen pyright
- name: selfie-lib - ruff
shell: bash
working-directory: python/selfie-lib
run: |
uv run --frozen ruff format --check
uv run --frozen ruff check
- name: pytest-selfie - install dependencies
shell: bash
working-directory: python/pytest-selfie
run: |
uv pip install --frozen -e . -e ../selfie-lib
uv pip install --frozen -r requirements.txt -r dev-requirements.txt
- name: pytest-selfie - pytest
shell: bash
working-directory: python/pytest-selfie
run: |
unset SELFIE || true
uv run --frozen pytest -vv
- name: pytest-selfie - pyright
shell: bash
working-directory: python/pytest-selfie
run: uv run --frozen pyright
- name: pytest-selfie - ruff
shell: bash
working-directory: python/pytest-selfie
run: |
uv run --frozen ruff format --check
uv run --frozen ruff check
- name: example-pytest-selfie - install dependencies
shell: bash
working-directory: python/example-pytest-selfie
run: |
uv pip install --frozen -e . -e ../selfie-lib -e ../pytest-selfie
uv pip install --frozen -r requirements.txt -r dev-requirements.txt
- name: example-pytest-selfie - pytest
shell: bash
working-directory: python/example-pytest-selfie
run: |
unset SELFIE || true
uv run --frozen pytest -vv
- name: example-pytest-selfie - pyright
shell: bash
working-directory: python/example-pytest-selfie
run: uv run --frozen pyright
- name: example-pytest-selfie - ruff
shell: bash
working-directory: python/example-pytest-selfie
run: |
uv run --frozen ruff format --check
uv run --frozen ruff check