@@ -3,7 +3,7 @@ name: python
33on : [push, pull_request]
44
55env :
6- POETRY_VERSION : " 2.1.1 "
6+ UV_VERSION : " 0.6.9 "
77 PYTHON_VERSION : " 3.11"
88
99jobs :
@@ -14,49 +14,50 @@ jobs:
1414 python-version : [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
1515 steps :
1616 - uses : actions/checkout@v4
17- - name : Install poetry
18- run : pipx install poetry==${POETRY_VERSION}
17+ - name : Install uv
18+ uses : astral-sh/setup-uv@v5
19+ # Caching is enabled by default for GitHub-hosted runners:
20+ # https://github.com/astral-sh/setup-uv?tab=readme-ov-file#enable-caching
21+ with :
22+ version : ${{ env.UV_VERSION }}
1923 - name : Set up Python ${{ matrix.python-version }}
2024 uses : actions/setup-python@v5
2125 with :
2226 python-version : ${{ matrix.python-version }}
23- # https://github.com/actions/setup-python#caching-packages-dependencies
24- cache : poetry
2527 - name : Install Nox
26- run : poetry sync --only nox
28+ run : uv sync --locked -- only-group nox
2729 - name : Test with Nox
28- run : poetry run nox -s test-${{ matrix.python-version }}
30+ run : uv run nox -s test-${{ matrix.python-version }}
2931 quality :
3032 runs-on : ubuntu-24.04
3133 strategy :
3234 matrix :
33- job :
34- - { nox-session: lint, poetry-groups: "lint" }
35- # type_check needs main and test dependencies for inline type annotations.
36- - { nox-session: type_check, poetry-groups: "type_check,main,test" }
37- - { nox-session: docs, poetry-groups: "docs" }
35+ nox-session : ["lint", "type_check", "docs"]
3836 steps :
3937 - uses : actions/checkout@v4
40- - name : Install poetry
41- run : pipx install poetry==${POETRY_VERSION}
38+ - name : Install uv
39+ uses : astral-sh/setup-uv@v5
40+ with :
41+ version : ${{ env.UV_VERSION }}
4242 - name : Set up Python
4343 uses : actions/setup-python@v5
4444 with :
4545 python-version : ${{ env.PYTHON_VERSION }}
46- cache : poetry
47- - name : Install Nox and group dependencies
48- run : poetry sync --only nox,${{ matrix.job.poetry-groups }}
46+ - name : Install dependencies
47+ run : uv sync --locked
4948 - name : Test with Nox
50- run : poetry run nox -s ${{ matrix.job .nox-session }}
51- poetry -check :
49+ run : uv run nox -s ${{ matrix.nox-session }}
50+ lock -check :
5251 runs-on : ubuntu-24.04
5352 steps :
5453 - uses : actions/checkout@v4
55- - name : Install poetry
56- run : pipx install poetry==${POETRY_VERSION}
54+ - name : Install uv
55+ uses : astral-sh/setup-uv@v5
56+ with :
57+ version : ${{ env.UV_VERSION }}
5758 - name : Set up Python
5859 uses : actions/setup-python@v5
5960 with :
6061 python-version : ${{ env.PYTHON_VERSION }}
61- - name : Validate Poetry Configuration and Lockfile Freshness
62- run : poetry check -- lock --strict
62+ - name : Validate Lockfile Up-to-date
63+ run : uv lock --check
0 commit comments