Skip to content

Commit 7ac0c3d

Browse files
committed
Switch to uv from poetry
1 parent fa5cbe6 commit 7ac0c3d

File tree

4 files changed

+387
-457
lines changed

4 files changed

+387
-457
lines changed

.github/workflows/main.yaml

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Check and test
22

33
on: [push, pull_request]
44

5+
env:
6+
FORCE_COLOR: "1"
7+
58
jobs:
69
build:
710
strategy:
@@ -17,33 +20,39 @@ jobs:
1720
steps:
1821
- run: sudo apt-get install flac mp3val oggz-tools
1922
- uses: actions/checkout@v4
20-
- run: pip install poetry
23+
- uses: astral-sh/setup-uv@v2
24+
# with:
25+
# enable-cache: true
2126
- uses: actions/setup-python@v5
27+
id: setup-python
2228
with:
2329
python-version: ${{ matrix.python-version }}
24-
cache: poetry
25-
- run: poetry env use $(which python)
26-
- run: poetry install
27-
- run: poetry run ruff check .
28-
- run: poetry run pytest
30+
- run: echo "UV_PYTHON=${{ steps.setup-python.outputs.python-path }}" >> $GITHUB_ENV
31+
- run: uv lock --locked
32+
- run: uv sync --all-extras --dev
33+
- run: uv run ruff check .
34+
- run: uv run pytest
2935

30-
build-beets-versions:
31-
runs-on: ubuntu-latest
32-
strategy:
33-
matrix:
34-
beets:
35-
- "git+https://github.com/beetbox/beets#master"
36-
- "beets==1.6.1"
36+
# build-beets-versions:
37+
# strategy:
38+
# matrix:
39+
# beets:
40+
# - "beets@git+https://github.com/beetbox/beets#master"
41+
# - "beets==1.6.1"
3742

38-
steps:
39-
- run: sudo apt-get install flac mp3val oggz-tools
40-
- uses: actions/checkout@v4
41-
- run: pip install poetry
42-
- uses: actions/setup-python@v5
43-
with:
44-
python-version: 3.9
45-
cache: poetry
46-
- run: poetry env use $(which python)
47-
- run: poetry install
48-
- run: poetry add ${{ matrix.beets }}
49-
- run: poetry run pytest
43+
# runs-on: ubuntu-latest
44+
45+
# steps:
46+
# - run: sudo apt-get install flac mp3val oggz-tools
47+
# - uses: actions/checkout@v4
48+
# - uses: astral-sh/setup-uv@v2
49+
# with:
50+
# enable-cache: true
51+
# - uses: actions/setup-python@v5
52+
# id: setup-python
53+
# with:
54+
# python-version: ${{ matrix.python-version }}
55+
# - run: echo "UV_PYTHON=${{ steps.setup-python.outputs.python-path }}" >> $GITHUB_ENV
56+
# - run: uv lock -P ${{ matrix.beets }}
57+
# - run: uv sync --all-extras --dev
58+
# - run: uv run pytest

0 commit comments

Comments
 (0)