Switch to uv from poetry #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |