@@ -17,47 +17,42 @@ jobs:
1717
1818 steps :
1919 - uses : actions/checkout@v4
20- - name : Set up Python ${{ matrix.python-version }}
21- uses : actions /setup-python @v5
20+ - name : Set up uv
21+ uses : astral-sh /setup-uv @v5
2222 with :
2323 python-version : ${{ matrix.python-version }}
2424 - name : Install dependencies
25- run : |
26- python -m pip install --upgrade pip
27- python -m pip install flake8 pytest mypy
28- - name : Lint with flake8
25+ run : uv sync --group dev
26+ - name : Lint with ruff
2927 run : |
3028 # stop the build if there are Python syntax errors or undefined names
31- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
29+ uv run ruff check .
3230 - name : Check with mypy
33- run : mypy pythonosc examples
31+ run : uv run mypy pythonosc examples
3432 - name : Test with pytest
35- run : pytest
33+ run : uv run pytest
3634 lint :
3735 runs-on : ubuntu-latest
3836 steps :
39- - uses : actions/checkout@v3
40- - uses : psf/black@stable
37+ - uses : actions/checkout@v4
38+ - name : Set up uv
39+ uses : astral-sh/setup-uv@v5
40+ - name : Run ruff format
41+ run : uv run ruff format --check .
4142
4243 check-types-published :
4344 runs-on : ubuntu-latest
4445 steps :
45- - uses : actions/checkout@v3
46- - uses : actions/setup-python@v5
46+ - uses : actions/checkout@v4
47+ - name : Set up uv
48+ uses : astral-sh/setup-uv@v5
4749 with :
4850 python-version : ' 3.12'
49- - run : |
50- pip install build
51- python -m build --sdist --wheel
52-
51+ - name : Build package
52+ run : uv build
53+ - name : Verify package installation and types
54+ run : |
5355 temp=$(mktemp -d)
54-
55- python -m venv $temp/venv
56- source $temp/venv/bin/activate
57-
58- pip install mypy ./dist/*whl
59-
60- cd $temp
61-
62- echo 'import pythonosc' > demo.py
63- mypy demo.py
56+ uv run --with mypy --with ./dist/*.whl --no-project -- python -c "import pythonosc"
57+ echo 'import pythonosc' > $temp/demo.py
58+ uv run --with mypy --with ./dist/*.whl --no-project -- mypy $temp/demo.py
0 commit comments