@@ -21,18 +21,23 @@ jobs:
2121 with :
2222 python-version : ${{ matrix.python-version }}
2323
24+ - name : Install uv
25+ uses : astral-sh/setup-uv@v4
26+ with :
27+ enable-cache : true
28+ cache-dependency-glob : " pyproject.toml"
29+
2430 - name : Install dependencies
2531 run : |
26- python -m pip install --upgrade pip
27- pip install -e ".[dev]"
32+ uv sync --extra dev
2833
2934 - name : Run flake8
3035 run : |
31- flake8 ioc/ tests/
36+ uv run flake8 ioc/ tests/
3237
3338 - name : Run mypy (optional)
3439 run : |
35- mypy ioc/ || true
40+ uv run mypy ioc/ || true
3641 continue-on-error : true
3742
3843 test-core :
@@ -49,15 +54,20 @@ jobs:
4954 with :
5055 python-version : ${{ matrix.python-version }}
5156
57+ - name : Install uv
58+ uses : astral-sh/setup-uv@v4
59+ with :
60+ enable-cache : true
61+ cache-dependency-glob : " pyproject.toml"
62+
5263 - name : Install core dependencies
5364 run : |
54- python -m pip install --upgrade pip
55- pip install -e .
65+ uv sync
5666
5767 - name : Run core tests (excluding extras)
5868 run : |
5969 # Run only core tests, excluding extra package tests
60- python -m unittest discover -s tests -p "test_*.py" -v 2>&1 | grep -v "extra\." | tee test_output.txt
70+ uv run python -m unittest discover -s tests -p "test_*.py" -v 2>&1 | grep -v "extra\." | tee test_output.txt
6171
6272 # Check results
6373 if grep -q "FAILED" test_output.txt; then
@@ -86,10 +96,15 @@ jobs:
8696 with :
8797 python-version : ${{ matrix.python-version }}
8898
99+ - name : Install uv
100+ uses : astral-sh/setup-uv@v4
101+ with :
102+ enable-cache : true
103+ cache-dependency-glob : " pyproject.toml"
104+
89105 - name : Install dependencies with ${{ matrix.extras }}
90106 run : |
91- python -m pip install --upgrade pip
92- pip install -e ".[${{ matrix.extras }}]"
107+ uv sync --extra ${{ matrix.extras }}
93108
94109 - name : Check if extras tests exist and dependencies are available
95110 id : check_tests
@@ -132,7 +147,7 @@ jobs:
132147 - name : Run tests for ${{ matrix.extras }}
133148 if : steps.check_tests.outputs.should_run == 'true'
134149 run : |
135- python -m unittest discover -s $(echo "${{ matrix.test_module }}" | tr '.' '/') -p "test_*.py" -v
150+ uv run python -m unittest discover -s $(echo "${{ matrix.test_module }}" | tr '.' '/') -p "test_*.py" -v
136151 continue-on-error : true
137152
138153 test-all-extras :
@@ -149,10 +164,15 @@ jobs:
149164 with :
150165 python-version : ${{ matrix.python-version }}
151166
167+ - name : Install uv
168+ uses : astral-sh/setup-uv@v4
169+ with :
170+ enable-cache : true
171+ cache-dependency-glob : " pyproject.toml"
172+
152173 - name : Install all dependencies
153174 run : |
154- python -m pip install --upgrade pip
155- pip install -e ".[flask,jinja2,redis,dev]"
175+ uv sync --extra flask --extra jinja2 --extra redis --extra dev
156176
157177 - name : Create smart test runner
158178 run : |
@@ -222,7 +242,7 @@ jobs:
222242
223243 - name : Run all tests with smart error handling
224244 run : |
225- python smart_test_runner.py
245+ uv run python smart_test_runner.py
226246
227247 docs :
228248 runs-on : ubuntu-latest
@@ -235,15 +255,20 @@ jobs:
235255 with :
236256 python-version : ' 3.11'
237257
258+ - name : Install uv
259+ uses : astral-sh/setup-uv@v4
260+ with :
261+ enable-cache : true
262+ cache-dependency-glob : " pyproject.toml"
263+
238264 - name : Install dependencies
239265 run : |
240- python -m pip install --upgrade pip
241- pip install -e .
242- pip install sphinx
266+ uv sync
267+ uv pip install sphinx
243268
244269 - name : Build documentation
245270 run : |
246- sphinx-build -nW -b html -d docs/_build/doctrees docs docs/_build/html
271+ uv run sphinx-build -nW -b html -d docs/_build/doctrees docs docs/_build/html
247272
248273 - name : Upload documentation artifacts
249274 uses : actions/upload-artifact@v4
@@ -263,15 +288,20 @@ jobs:
263288 with :
264289 python-version : ' 3.11'
265290
291+ - name : Install uv
292+ uses : astral-sh/setup-uv@v4
293+ with :
294+ enable-cache : true
295+ cache-dependency-glob : " pyproject.toml"
296+
266297 - name : Install build dependencies
267298 run : |
268- python -m pip install --upgrade pip
269- pip install build twine
299+ uv pip install build twine
270300
271301 - name : Build package
272302 run : |
273- python -m build
303+ uv run python -m build
274304
275305 - name : Check package
276306 run : |
277- twine check dist/*
307+ uv run twine check dist/*
0 commit comments