Skip to content

Commit e355354

Browse files
committed
Do less cding around in the third-party workflow
1 parent 9471a44 commit e355354

File tree

1 file changed

+97
-69
lines changed

1 file changed

+97
-69
lines changed

.github/workflows/third_party.yml

Lines changed: 97 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,19 @@ jobs:
6161
with:
6262
path: typing-extensions-latest
6363
persist-credentials: false
64-
- name: Add local version of typing_extensions as a dependency
65-
run: cd pydantic; uv add --editable ../typing-extensions-latest
66-
- name: Install pydantic test dependencies
67-
run: cd pydantic; uv sync --group dev
68-
- name: List installed dependencies
69-
run: cd pydantic; uv pip list
70-
- name: Run pydantic tests
71-
run: cd pydantic; uv run pytest
64+
- name: Run tests with typing_extensions main branch
65+
working-directory: pydantic
66+
run: |
67+
set -x
68+
69+
uv add --editable ../typing-extensions-latest
70+
uv sync --group dev
71+
72+
echo "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
73+
uv pip list
74+
echo "\n\n"
75+
76+
uv run pytest
7277
7378
typing_inspect:
7479
name: typing_inspect tests
@@ -91,19 +96,20 @@ jobs:
9196
with:
9297
path: typing-extensions-latest
9398
persist-credentials: false
94-
- name: Install typing_inspect test dependencies
99+
- name: Run tests with typing_extensions main branch
100+
working-directory: typing_inspect
95101
run: |
96102
set -x
97-
cd typing_inspect
98103
uv venv .venv
104+
99105
uv pip install -r test-requirements.txt --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
100-
- name: Install typing_extensions latest
101-
run: cd typing_inspect; uv pip install "typing-extensions @ ../typing-extensions-latest"
102-
- name: List all installed dependencies
103-
run: cd typing_inspect; uv pip freeze
104-
- name: Run typing_inspect tests
105-
run: |
106-
cd typing_inspect; uv run --no-project pytest
106+
uv pip install "typing-extensions @ ../typing-extensions-latest"
107+
108+
echo "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
109+
uv pip freeze
110+
echo "\n\n"
111+
112+
uv run --no-project pytest
107113
108114
pycroscope:
109115
name: pycroscope tests
@@ -126,19 +132,20 @@ jobs:
126132
with:
127133
path: typing-extensions-latest
128134
persist-credentials: false
129-
- name: Install pycroscope test requirements
135+
- name: Run tests with typing_extensions main branch
136+
working-directory: pycroscope
130137
run: |
131138
set -x
132-
cd pycroscope
133139
uv venv .venv
140+
134141
uv pip install 'pycroscope[tests] @ .' --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
135-
- name: Install typing_extensions latest
136-
run: cd pycroscope; uv pip install "typing-extensions @ ../typing-extensions-latest"
137-
- name: List all installed dependencies
138-
run: cd pycroscope; uv pip freeze
139-
- name: Run pycroscope tests
140-
run: |
141-
cd pycroscope; uv run --no-project pytest pycroscope/
142+
uv pip install "typing-extensions @ ../typing-extensions-latest"
143+
144+
echo "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
145+
uv pip freeze
146+
echo "\n\n"
147+
148+
uv run --no-project pytest pycroscope/
142149
143150
typeguard:
144151
name: typeguard tests
@@ -161,20 +168,22 @@ jobs:
161168
with:
162169
path: typing-extensions-latest
163170
persist-credentials: false
164-
- name: Install typeguard test requirements
171+
- name: Run tests with typing_extensions main branch
172+
env:
173+
PYTHON_COLORS: 0 # A test fails if tracebacks are colorized
174+
working-directory: typeguard
165175
run: |
166176
set -x
167-
cd typeguard
168177
uv venv .venv
178+
169179
uv pip install "typeguard @ ." --group test --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
170-
- name: Install typing_extensions latest
171-
run: cd typeguard; uv pip install "typing-extensions @ ../typing-extensions-latest"
172-
- name: List all installed dependencies
173-
run: cd typeguard; uv pip freeze
174-
- name: Run typeguard tests
175-
run: |
176-
export PYTHON_COLORS=0 # A test fails if tracebacks are colorized
177-
cd typeguard; uv run --no-project pytest
180+
uv pip install "typing-extensions @ ../typing-extensions-latest"
181+
182+
echo "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
183+
uv pip freeze
184+
echo "\n\n"
185+
186+
uv run --no-project pytest
178187
179188
typed-argument-parser:
180189
name: typed-argument-parser tests
@@ -203,20 +212,21 @@ jobs:
203212
run: |
204213
git config --global user.email "[email protected]"
205214
git config --global user.name "Your Name"
206-
- name: Install typed-argument-parser test requirements
215+
- name: Run tests with typing_extensions main branch
216+
working-directory: typed-argument-parser
207217
run: |
208218
set -x
209-
cd typed-argument-parser
210219
uv venv .venv
220+
211221
uv pip install "typed-argument-parser @ ." --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
212222
uv pip install pytest --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
213-
- name: Install typing_extensions latest
214-
run: cd typed-argument-parser; uv pip install "typing-extensions @ ../typing-extensions-latest"
215-
- name: List all installed dependencies
216-
run: cd typed-argument-parser; uv pip freeze
217-
- name: Run typed-argument-parser tests
218-
run: |
219-
cd typed-argument-parser; uv run --no-project pytest
223+
uv pip install "typing-extensions @ ../typing-extensions-latest"
224+
225+
echo "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
226+
uv pip freeze
227+
echo "\n\n"
228+
229+
uv run --no-project pytest
220230
221231
mypy:
222232
name: stubtest & mypyc tests
@@ -239,20 +249,21 @@ jobs:
239249
with:
240250
path: typing-extensions-latest
241251
persist-credentials: false
242-
- name: Install mypy test requirements
252+
- name: Run tests with typing_extensions main branch
253+
working-directory: mypy
243254
run: |
244255
set -x
245-
cd mypy
246256
uv venv .venv
257+
247258
uv pip install -r test-requirements.txt --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
248259
uv pip install -e .
249-
- name: Install typing_extensions latest
250-
run: cd mypy; uv pip install "typing-extensions @ ../typing-extensions-latest"
251-
- name: List all installed dependencies
252-
run: cd mypy; uv pip freeze
253-
- name: Run stubtest & mypyc tests
254-
run: |
255-
cd mypy; uv run --no-project pytest -n 2 ./mypy/test/teststubtest.py ./mypyc/test/test_run.py ./mypyc/test/test_external.py
260+
uv pip install "typing_extensions @ ../typing-extensions-latest"
261+
262+
echo "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
263+
uv pip freeze
264+
echo "\n\n"
265+
266+
uv run --no-project pytest -n 2 ./mypy/test/teststubtest.py ./mypyc/test/test_run.py ./mypyc/test/test_external.py
256267
257268
cattrs:
258269
name: cattrs tests
@@ -275,14 +286,19 @@ jobs:
275286
with:
276287
path: typing-extensions-latest
277288
persist-credentials: false
278-
- name: Add local version of typing_extensions as a dependency
279-
run: cd cattrs; uv add --editable ../typing-extensions-latest
280-
- name: Install test dependencies
281-
run: cd cattrs; uv sync --group test --all-extras
282-
- name: List installed dependencies
283-
run: cd cattrs; uv pip list
284-
- name: Run tests
285-
run: cd cattrs; uv run pytest tests
289+
- name: Run tests with typing_extensions main branch
290+
working-directory: cattrs
291+
run: |
292+
set -x
293+
294+
uv add --editable ../typing-extensions-latest
295+
uv sync --group test --all-extras
296+
297+
echo "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
298+
uv pip list
299+
echo "\n\n"
300+
301+
uv run pytest tests
286302
287303
sqlalchemy:
288304
name: sqlalchemy tests
@@ -310,12 +326,14 @@ jobs:
310326
with:
311327
path: typing-extensions-latest
312328
persist-credentials: false
313-
- name: Run sqlalchemy tests
329+
- name: Run sqlalchemy tests with typing_extensions main branch
330+
working-directory: sqlalchemy
314331
run: |
315-
cd sqlalchemy
316-
uvx --with setuptools tox -e github-nocext \
317-
--force-dep "typing-extensions @ file://$(pwd)/../typing-extensions-latest" \
318-
-- -q --nomemory --notimingintensive
332+
set -x
333+
334+
uvx \
335+
--with=setuptools \
336+
tox -e github-nocext --force-dep="typing-extensions @ file://$(pwd)/../typing-extensions-latest" -- -q --nomemory --notimingintensive
319337
320338
321339
litestar:
@@ -339,9 +357,19 @@ jobs:
339357
with:
340358
path: typing-extensions-latest
341359
persist-credentials: false
342-
- name: Run litestar tests
343-
run: uv run --with=../typing-extensions-latest -- python -m pytest tests/unit/test_typing.py tests/unit/test_dto
360+
- name: Run litestar tests with typing_extensions main branch
344361
working-directory: litestar
362+
run: |
363+
set -x
364+
365+
uv add --editable ../typing-extensions-latest
366+
uv sync
367+
368+
echo "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
369+
uv pip list
370+
echo "\n\n"
371+
372+
uv run python -m pytest tests/unit/test_typing.py tests/unit/test_dto
345373
346374
create-issue-on-failure:
347375
name: Create an issue if daily tests failed

0 commit comments

Comments
 (0)