Skip to content

Commit 7fa458e

Browse files
authored
ci: add repeated async teardown stability checks (#2585)
1 parent 933a3a9 commit 7fa458e

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
repeat_count="${1:-5}"
5+
6+
asyncio_progress_args=(
7+
tests/test_asyncio_progress.py
8+
)
9+
10+
run_step_execution_args=(
11+
tests/test_run_step_execution.py
12+
-k
13+
"cancel or post_invoke"
14+
)
15+
16+
for run in $(seq 1 "$repeat_count"); do
17+
echo "Async teardown stability run ${run}/${repeat_count}"
18+
uv run pytest -q "${asyncio_progress_args[@]}"
19+
uv run pytest -q "${run_step_execution_args[@]}"
20+
done

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ jobs:
9797
- name: Run tests
9898
if: steps.changes.outputs.run == 'true' && matrix.python-version != '3.12'
9999
run: make tests
100+
- name: Run async teardown stability tests
101+
if: steps.changes.outputs.run == 'true' && (matrix.python-version == '3.10' || matrix.python-version == '3.14')
102+
run: make tests-asyncio-stability
100103
- name: Skip tests
101104
if: steps.changes.outputs.run != 'true'
102105
run: echo "Skipping tests for non-code changes."

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ mypy:
2222
.PHONY: tests
2323
tests: tests-parallel tests-serial
2424

25+
.PHONY: tests-asyncio-stability
26+
tests-asyncio-stability:
27+
bash .github/scripts/run-asyncio-teardown-stability.sh
28+
2529
.PHONY: tests-parallel
2630
tests-parallel:
2731
uv run pytest -n auto --dist loadfile -m "not serial"

0 commit comments

Comments
 (0)