|
48 | 48 | pip install virtualenv --upgrade |
49 | 49 | python -m venv venv |
50 | 50 | . venv/bin/activate |
51 | | - pip install -U pip setuptools wheel |
52 | | - pip install -r requirements_test.txt -r requirements_commit.txt |
| 51 | + pip install uv |
| 52 | + uv pip install -U pip setuptools wheel |
| 53 | + uv pip install -r requirements_test.txt -r requirements_commit.txt |
| 54 | + # TODO: Remove after update of aiohttp beyond 3.10.0 |
| 55 | + uv pip show aiohttp | grep -q "Version: 3.10.0" && (grep -q "core.locations" venv/lib/python*/site-packages/aiohttp/web_urldispatcher.py && echo " *** aiohttp already patched" || ( echo "Patching aiohttp 3.10.0 for tests"; patch -tRup0 venv/lib/python*/site-packages/aiohttp/web_urldispatcher.py < patch/aiohttp310.patch && echo " *** aiohttp Patched!" || echo " *** aiohttp patch failed?")) || ( echo " ***"; echo " *** WE CAN REMOVE THE PATCH FOR aiohttp 3.10.0 from $0"; echo " ***" ) |
53 | 56 | - name: Restore pre-commit environment from cache |
54 | 57 | id: cache-precommit |
55 | 58 | uses: actions/cache@v4 |
|
97 | 100 | - name: Ruff (with fix) |
98 | 101 | run: | |
99 | 102 | . venv/bin/activate |
100 | | - ruff plugwise/*py tests/*py |
| 103 | + ruff check --fix plugwise/*py tests/*py |
101 | 104 | - name: If needed, commit ruff changes to the pull request |
102 | 105 | if: failure() |
103 | 106 | run: | |
@@ -194,11 +197,14 @@ jobs: |
194 | 197 | run: | |
195 | 198 | python -m venv venv |
196 | 199 | . venv/bin/activate |
197 | | - pip install -U pip setuptools wheel |
| 200 | + pip install uv |
| 201 | + uv pip install -U pip setuptools wheel |
198 | 202 | #pip install -r requirements_test.txt |
199 | 203 | # 20220124 Mimic setup_test.sh |
200 | | - pip install --upgrade -r requirements_test.txt -c https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/package_constraints.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test_pre_commit.txt |
201 | | - pip install --upgrade pytest-asyncio |
| 204 | + uv pip install --upgrade -r requirements_test.txt -c https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/package_constraints.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test_pre_commit.txt |
| 205 | + uv pip install --upgrade pytest-asyncio |
| 206 | + # TODO: Remove after update of aiohttp beyond 3.10.0 |
| 207 | + uv pip show aiohttp | grep -q "Version: 3.10.0" && (grep -q "core.locations" venv/lib/python*/site-packages/aiohttp/web_urldispatcher.py && echo " *** aiohttp already patched" || ( echo "Patching aiohttp 3.10.0 for tests"; patch -tRup0 venv/lib/python*/site-packages/aiohttp/web_urldispatcher.py < patch/aiohttp310.patch && echo " *** aiohttp Patched!" || echo " *** aiohttp patch failed?")) || ( echo " ***"; echo " *** WE CAN REMOVE THE PATCH FOR aiohttp 3.10.0 from $0"; echo " ***" ) |
202 | 208 |
|
203 | 209 | pytest: |
204 | 210 | runs-on: ubuntu-latest |
|
0 commit comments