Skip to content

Switch to uv from poetry #49

Switch to uv from poetry

Switch to uv from poetry #49

Workflow file for this run

name: Check and test
on: [push, pull_request]
env:
UV_CACHE_DIR: /tmp/.uv-cache
FORCE_COLOR: "1"
jobs:
build:
strategy:
matrix:
python-version:
- "3.9" # minimum required
- "3.12" # latest
- "3.13-dev" # next
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.python-version == '3.13-dev' }}
env:
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- run: sudo apt-get install flac mp3val oggz-tools
- uses: actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: uv cache
uses: actions/cache@v4
with:
path: ${{ env.UV_CACHE_DIR}}
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: uv lock --locked
- run: uv sync --all-extras --dev
- run: uv run ruff check .
- run: uv run pytest
- run: uv cache prune --ci
build-beets-versions:
strategy:
matrix:
beets:
- "beets@git+https://github.com/beetbox/beets#master"
- "beets==1.6.1"
runs-on: ubuntu-latest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- run: sudo apt-get install flac mp3val oggz-tools
- uses: actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: uv cache
uses: actions/cache@v4
with:
path: ${{ env.UV_CACHE_DIR}}
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- run: uv lock -P ${{ matrix.beets }}
- run: uv sync --all-extras --dev
- run: uv run pytest
- run: uv cache prune --ci