-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (64 loc) · 2 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Check and test
on: [push, pull_request]
env:
UV_CACHE_DIR: /tmp/.uv-cache
UV_SYSTEM_PYTHON: true
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' }}
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:
runs-on: ubuntu-latest
strategy:
matrix:
beets:
- "beets@git+https://github.com/beetbox/beets#master"
- "beets==1.6.1"
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 -P ${{ matrix.beets }}
- run: uv sync --all-extras --dev
- run: uv run pytest
- run: uv cache prune --ci