11name : Tests
22
3- on : [pull_request]
3+ on :
4+ pull_request :
5+ workflow_call :
46
57jobs :
68 linting :
79 runs-on : ubuntu-latest
810 steps :
911 - uses : actions/checkout@v6
10- - name : Set Python environment
11- uses : actions/setup-python@v6
12+
13+ - name : Install uv
14+ uses : astral-sh/setup-uv@v7
1215 with :
13- python-version : 3.14
14- architecture : x64
16+ enable-cache : true
17+ python-version : " 3.14 "
1518
1619 - name : Install dependencies
17- run : pip install -e .[dev]
20+ run : uv sync
1821
19- - name : Linting
20- run : |
21- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
22- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
22+ - name : Lint with Ruff
23+ run : uv run ruff check .
2324
24- - name : Check code format with Black
25- run : black --check us
25+ - name : Check code format with Ruff
26+ run : uv run ruff format --check us
2627
2728 testing :
2829 needs : linting
@@ -32,36 +33,34 @@ jobs:
3233 matrix :
3334 python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
3435 steps :
35- - uses : actions/checkout@v6
36- - name : Set up Python ${{ matrix.python-version }}
37- uses : actions/setup-python@v6
38- with :
39- python-version : ${{ matrix.python-version }}
40- - name : Install dependencies
41- run : |
42- pip install -e .[dev]
43- - name : Test with pytest
44- run : |
45- pytest .
36+ - uses : actions/checkout@v6
37+
38+ - name : Install uv
39+ uses : astral-sh/setup-uv@v7
40+ with :
41+ enable-cache : true
42+ python-version : ${{ matrix.python-version }}
43+
44+ - name : Install dependencies
45+ run : uv sync
46+
47+ - name : Test with pytest
48+ run : uv run pytest .
4649
4750 building :
4851 needs : linting
4952 runs-on : ubuntu-latest
5053 steps :
5154 - uses : actions/checkout@v6
52- - name : Set Python environment
53- uses : actions/setup-python@v6
54- with :
55- python-version : 3.14
56- architecture : x64
5755
58- - name : Install dependencies
59- run : |
60- pip install setuptools build wheel
56+ - name : Install uv
57+ uses : astral-sh/setup-uv@v7
58+ with :
59+ enable-cache : true
60+ python-version : " 3.14"
6161
62- - name : Builds package
63- run : |
64- python -m build . -w -n
62+ - name : Build package
63+ run : uv build --wheel
6564
6665 - uses : actions/upload-artifact@v7
6766 with :
0 commit comments