Skip to content

Migrate Python projects from poetry to uv #524

Migrate Python projects from poetry to uv

Migrate Python projects from poetry to uv #524

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: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv (Unix)
if: runner.os != 'Windows'
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install uv
uv --version
- name: Install uv (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install uv
uv --version
- name: selfie-lib - install dependencies
shell: bash
run: |
uv venv
. .venv/bin/activate || . .venv/Scripts/activate
python -m pip install uv
uv pip install -r requirements.txt -r dev-requirements.txt
working-directory: python/selfie-lib
- name: selfie-lib - pytest
shell: bash
run: |
. .venv/bin/activate || . .venv/Scripts/activate
python -m pytest -vv
working-directory: python/selfie-lib
- name: selfie-lib - pyright
shell: bash
run: |
. .venv/bin/activate || . .venv/Scripts/activate
python -m pyright
working-directory: python/selfie-lib
- name: selfie-lib - ruff
shell: bash
run: |
. .venv/bin/activate || . .venv/Scripts/activate
python -m ruff format --check && python -m ruff check
working-directory: python/selfie-lib
- name: pytest-selfie - install dependencies
shell: bash
run: |
uv venv
. .venv/bin/activate || . .venv/Scripts/activate
python -m pip install uv
uv pip install -r requirements.txt -r dev-requirements.txt
working-directory: python/pytest-selfie
- name: pytest-selfie - pyright
shell: bash
run: |
. .venv/bin/activate || . .venv/Scripts/activate
python -m pyright
working-directory: python/pytest-selfie
- name: pytest-selfie - ruff
shell: bash
run: |
. .venv/bin/activate || . .venv/Scripts/activate
python -m ruff format --check && python -m ruff check
working-directory: python/pytest-selfie
- name: example-pytest-selfie - install dependencies
shell: bash
run: |
uv venv
. .venv/bin/activate || . .venv/Scripts/activate
python -m pip install uv
uv pip install -r requirements.txt -r dev-requirements.txt
working-directory: python/example-pytest-selfie
- name: example-pytest-selfie - pytest
shell: bash
run: |
. .venv/bin/activate || . .venv/Scripts/activate
python -m pytest -vv
working-directory: python/example-pytest-selfie
- name: example-pytest-selfie - pyright
shell: bash
run: |
. .venv/bin/activate || . .venv/Scripts/activate
python -m pyright
working-directory: python/example-pytest-selfie
- name: example-pytest-selfie - ruff
shell: bash
run: |
. .venv/bin/activate || . .venv/Scripts/activate
python -m ruff format --check && python -m ruff check
working-directory: python/example-pytest-selfie