use uv in ci

This commit is contained in:
Vadim committed 2026-02-14 22:01:18 +01:00
1 parent bf0940693c
commit e00a76f900
2 files changed
+33 -32

No files matched your search

+24 -18
View File
@@ -3,13 +3,13 @@ name: Check Requirements
on:
push:
paths:
- "requirements-linux.txt"
- "requirements-windows.txt"
- "pyproject.toml"
- "uv.lock"
pull_request:
paths:
- "requirements-linux.txt"
- "requirements-windows.txt"
- "pyproject.toml"
- "uv.lock"
jobs:
build:
@@ -23,29 +23,35 @@ jobs:
TARGET: macOS
- os: windows-latest
TARGET: Windows
python-version: [ "3.10" ]
python-version: [ "3.12" ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (Windows)
if: matrix.TARGET == 'Windows'
- name: Install uv
run: |
python -m pip install --upgrade pip
pip install -r requirements-windows.txt
curl -LsSf https://astral.sh/uv/install.sh | sh
shell: bash
- name: Install dependencies (others)
- name: Add uv to PATH (Unix)
if: matrix.TARGET != 'Windows'
run: |
python -m pip install --upgrade pip
pip install -r requirements-linux.txt
- name: Install gpu dependencies
if: matrix.TARGET != 'macOS'
run: pip3 install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2+cu117 --index-url https://download.pytorch.org/whl/cu117
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
shell: bash
- name: Add uv to PATH (Windows)
if: matrix.TARGET == 'Windows'
run: echo "$env:USERPROFILE\.local\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh
- name: Sync dependencies from pyproject.toml
run: uv sync
shell: bash
+9 -14
View File
@@ -7,30 +7,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
python-version: [ "3.12" ]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (Windows)
if: matrix.TARGET == 'Windows'
- name: Install uv
run: |
python -m pip install --upgrade pip
pip install -r requirements-windows.txt
#pip install -e .
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies (others)
if: matrix.TARGET != 'Windows'
run: |
python -m pip install --upgrade pip
pip install -r requirements-linux.txt
#pip install -e .
- name: Sync dependencies from pyproject.toml
run: uv sync
- name: Run pytest
run: python -m pytest --import-mode=append pytest/
run: uv run pytest --import-mode=append pytest/