Skip to content

Commit 7091b92

Browse files
committed
ci: use uv to install poetry in CI workflow
Mirror of esphome/aioesphomeapi#1650 for python-zeroconf. Replace the `pipx install poetry` step in the test matrix and the `snok/install-poetry` action in the benchmarks job with `astral-sh/[email protected]` followed by `uv tool install poetry`. `setup-python`'s `cache: "poetry"` continues to cache the per-job virtualenv keyed off `poetry.lock`; the change is strictly in how poetry itself gets onto PATH. `uv tool install poetry` provisions poetry far faster than `pipx install poetry`, and `setup-uv`'s `enable-cache: true` covers subsequent wheel fetches. Effect is per-job, so it compounds across the test matrix (CPython 3.9-3.14, 3.14t, PyPy 3.9/3.10 over Linux/macOS/Windows). No production code is touched.
1 parent 72a0152 commit 7091b92

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@ jobs:
6969
runs-on: ${{ matrix.os }}
7070
steps:
7171
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
72+
- name: Set up uv
73+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
74+
with:
75+
enable-cache: true
7276
- name: Install poetry
73-
run: pipx install poetry
77+
run: uv tool install poetry
7478
- name: Set up Python
7579
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v5
7680
with:
@@ -102,7 +106,12 @@ jobs:
102106
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v5
103107
with:
104108
python-version: 3.13
105-
- uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1.4.1
109+
- name: Set up uv
110+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
111+
with:
112+
enable-cache: true
113+
- name: Install poetry
114+
run: uv tool install poetry
106115
- name: Install Dependencies
107116
run: |
108117
REQUIRE_CYTHON=1 poetry install --only=main,dev

0 commit comments

Comments
 (0)