1111 MINIMUM_PYTHON_VERSION : ' 3.10'
1212
1313jobs :
14-
1514 precommit :
1615 runs-on : ubuntu-latest
1716 steps :
18- - name : Install Python ${{ env.MINIMUM_PYTHON_VERSION }}
19- uses : actions/setup-python@v4
17+ - uses : actions/checkout@v4
18+ - name : Install uv and set the python version
19+ uses : astral-sh/setup-uv@v6
2020 with :
2121 python-version : ${{ env.MINIMUM_PYTHON_VERSION }}
22- - uses : actions/checkout@v3
23- - name : Install pre-commit
24- run : |
25- python -m pip install --upgrade pip
26- python -m pip install pre-commit virtualenv!=20.0.6
27- pre-commit install
2822 - name : Run static code inspections
29- run : pre-commit run --all-files
23+ run : uv run pre-commit run --all-files
3024
3125 build :
3226 runs-on : ubuntu-latest
3327 strategy :
3428 matrix :
3529 python-version : ["3.10", "3.11", "3.12"]
3630 steps :
37- - uses : actions/checkout@v3
31+ - uses : actions/checkout@v4
3832 - name : Set up Python ${{ matrix.python-version }}
39- uses : actions/setup-python@v4
33+ uses : actions/setup-python@v5
34+ - name : Install uv and set the python version
35+ uses : astral-sh/setup-uv@v6
4036 with :
4137 python-version : ${{ matrix.python-version }}
42- - name : Install dependencies
38+ - name : Test with uv
4339 run : |
44- python -m pip install --upgrade pip
45- python -m pip install tox tox-gh-actions poetry
46- - name : Test with tox
47- run : |
48- tox
40+ uv run pytest --cov-branch --cov-report term-missing --cov=tests/ --cov=midom/
4941 deploy :
5042 if : github.event_name == 'release'
5143 needs : [precommit, build]
5244 runs-on : ubuntu-latest
5345 steps :
54- - name : Install Python ${{ env.MINIMUM_PYTHON_VERSION }}
55- uses : actions/setup-python@v4
46+ - uses : actions/checkout@v4
47+ - name : Install uv and set the python version
48+ uses : astral-sh/setup-uv@v6
5649 with :
5750 python-version : ${{ env.MINIMUM_PYTHON_VERSION }}
58- - uses : actions/checkout@v3
59- - name : Install dependencies
60- run : |
61- python -m pip install --upgrade pip
62- python -m pip install poetry
6351 - name : Upload to pypi
6452 env :
65- POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI_PASSWORD }}
53+ UV_PUBLISH_TOKEN : ${{ secrets.PYPI_PASSWORD }}
6654 run : |
67- poetry config http-basic.pypi "__token__" "${POETRY_PYPI_TOKEN_PYPI}"
68- poetry publish --build
55+ uv build
56+ uv publish
0 commit comments