Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Time out hanging tests in the VCS dependencies job (#7960)

Adrian8e94df65262f
diff --git a/.github/workflows/tests-vcs-deps.yml b/.github/workflows/tests-vcs-deps.yml
index bf867dba7..93f262b62 100644
--- a/.github/workflows/tests-vcs-deps.yml
+++ b/.github/workflows/tests-vcs-deps.yml
@@ -16,8 +16,11 @@ jobs:
tests:
name: tests
runs-on: ubuntu-latest
+ timeout-minutes: 30
env:
- PYTEST_ADDOPTS: -n auto --no-cov
+ # A development branch of a dependency can make a test hang forever, so
+ # tests get a time limit here that they do not need elsewhere.
+ PYTEST_ADDOPTS: -n auto --no-cov --timeout=120
TOXENV: vcs-deps
UV_PYTHON_PREFERENCE: only-system
steps:
diff --git a/tox.ini b/tox.ini
index 94c04f75f..ab53111b8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -44,6 +44,7 @@ deps =
pygments
pytest
pytest-cov >= 7.0.0
+ pytest-timeout
pytest-xdist
sybil >= 1.3.0 # https://github.com/cjw296/sybil/issues/20#issuecomment-605433422
pytest-twisted >= 1.14.3
@@ -214,7 +215,8 @@ deps =
#
# Pillow and uvloop build from source, and need the libjpeg headers and
# autotools respectively. robotexclusionrulesparser has no public repository,
-# so it stays at its latest release.
+# and PyDispatcher has seen no commit since 2023-10-23, so they stay at their
+# latest release.
commands_pre =
uv pip install --python {envpython} --no-deps --reinstall \
git+https://github.com/twisted/twisted \
@@ -235,7 +237,6 @@ commands_pre =
git+https://github.com/john-kurkowski/tldextract \
git+https://github.com/scrapy/w3lib \
git+https://github.com/zopefoundation/zope.interface \
- git+https://github.com/mcfletch/pydispatcher \
git+https://github.com/boto/boto3 \
git+https://github.com/bpython/bpython \
git+https://github.com/google/brotli \