@@ -29,28 +29,24 @@ jobs:
2929 dependencies : [full]
3030 tests-type : [unit]
3131 test-runner : [pytest]
32- venv-loc : [bin]
3332 include :
3433 - os : windows-latest
3534 python-version : ' 3.13'
3635 dependencies : full
3736 tests-type : unit
3837 test-runner : pytest
39- venv-loc : Scripts
4038 - os : ubuntu-22.04
4139 python-version : ' 3.10.4'
4240 dependencies : minimal
4341 tests-type : unit
4442 test-runner : pytest
45- venv-loc : bin
4643 - os : ubuntu-latest
4744 # this job is necessary for non-answer, 'yield' based tests
4845 # because pytest doesn't support such tests
4946 python-version : ' 3.10'
5047 dependencies : full
5148 tests-type : unit
5249 test-runner : nose
53- venv-loc : bin
5450 - os : ubuntu-latest
5551 # answer tests use 'yield', so they require nose
5652 # they are also attached to a specific, occasionally updated, Python version
@@ -59,14 +55,12 @@ jobs:
5955 dependencies : full
6056 tests-type : answer
6157 test-runner : nose
62- venv-loc : bin
6358 - os : ubuntu-latest
6459 # minimal tests with latest Python and no optional dependencies
65- python-version : ' 3.x '
60+ python-version : ' 3.14 '
6661 dependencies : ' '
6762 tests-type : unit
6863 test-runner : pytest
69- venv-loc : bin
7064
7165 runs-on : ${{ matrix.os }}
7266
7771
7872 steps :
7973 - name : Set up Python
80- uses : actions /setup-python@v6
74+ uses : astral-sh /setup-uv@v7
8175 with :
8276 python-version : ${{ matrix.python-version }}
77+ enable-cache : false
8378 - name : Checkout repo (bare)
8479 if : matrix.tests-type != 'answer'
8580 uses : actions/checkout@v5
@@ -92,34 +87,27 @@ jobs:
9287 shell : bash
9388 env :
9489 dependencies : ${{ matrix.dependencies }}
95- run : |
96- python -m venv .venv
97- source .venv/${{matrix.venv-loc}}/activate
98- source ./tests/ci_install.sh
90+ run : source ./tests/ci_install.sh
9991
10092 - name : Install and patch nosetest
10193 if : matrix.test-runner == 'nose'
94+ # note: this could be handled with [tool.uv.sources]
10295 run : |
103- source .venv/${{matrix.venv-loc}}/activate
104- python -m pip install -r nose_requirements.txt
96+ uv pip install -r nose_requirements.txt
10597 find .venv/lib/python${{matrix.python-version}}/site-packages/nose -name '*.py' \
10698 -exec sed -i -e s/collections.Callable/collections.abc.Callable/g '{}' ';'
10799
108100 - name : Show final env
109- run : |
110- source .venv/${{matrix.venv-loc}}/activate
111- python -m pip list
101+ run : uv pip list
112102
113103 - name : Run Unit Tests (pytest)
114104 if : matrix.test-runner == 'pytest'
115- run : |
116- source .venv/${{matrix.venv-loc}}/activate
117- pytest yt --color=yes
105+ run : uv run --no-sync pytest yt --color=yes
106+
118107 - name : Run Tests (nose)
119108 if : matrix.test-runner == 'nose'
120109 run : |
121- source .venv/${{matrix.venv-loc}}/activate
122- cat nose_ignores.txt | xargs python -m nose -c nose_unit.cfg --traverse-namespace
110+ cat nose_ignores.txt | xargs uv run python -m nose -c nose_unit.cfg --traverse-namespace
123111
124112 image-tests :
125113 name : Image tests
@@ -132,9 +120,10 @@ jobs:
132120
133121 steps :
134122 - name : Set up Python
135- uses : actions /setup-python@v6
123+ uses : astral-sh /setup-uv@v7
136124 with :
137125 python-version : ' 3.11'
126+ enable-cache : false
138127
139128 - name : Checkout repo (with submodules)
140129 uses : actions/checkout@v5
@@ -145,14 +134,14 @@ jobs:
145134 shell : bash
146135 env :
147136 dependencies : ' cartopy'
148- run : |
149- source ./tests/ci_install.sh
137+ run : source ./tests/ci_install.sh
150138
151139 - run : python -m pip list
152140
153141 - name : Run Image Tests
154142 run : |
155- pytest yt --color=yes --mpl -m mpl_image_compare \
143+ uv run --no-sync \
144+ pytest yt --color=yes --mpl -m mpl_image_compare \
156145 --mpl-generate-summary=html \
157146 --mpl-results-path=pytest_mpl_results \
158147 --mpl-baseline-path=tests/pytest_mpl_baseline \
@@ -161,7 +150,8 @@ jobs:
161150 - name : Generate new image baseline
162151 if : failure()
163152 run : |
164- pytest yt --color=yes --mpl -m mpl_image_compare \
153+ uv run --no-sync \
154+ pytest yt --color=yes --mpl -m mpl_image_compare \
165155 --mpl-generate-path=pytest_mpl_new_baseline \
166156 --last-failed
167157
0 commit comments