ci: add GitHub Actions test workflow across Python 3.8/3.10/3.12 (#28)#54
ci: add GitHub Actions test workflow across Python 3.8/3.10/3.12 (#28)#54ApoorvBrooklyn wants to merge 1 commit into
Conversation
…-o7#28) Add .github/workflows/test.yml: runs pytest (network tests disabled), ruff check, and mypy on every PR and push to main, matrixed across Python 3.8, 3.10, and 3.12. AGENTS.md previously documented "no CI" as a deliberate maintainer choice; this closes that gap with the lightest workflow that catches real cross-version regressions. While validating the matrix locally (no 3.8 available, so verified 3.10/3.12 in throwaway venvs), found two real version-sensitive bugs the new CI would have caught immediately: - unittest.mock.patch("...downloader.Downloader._DEFAULT_REGISTRY") resolves incorrectly on Python <=3.10: this package's __init__.py re-exports the legacy downloader() function under the same name as the downloader submodule, and mock's pre-3.11 string-target resolution walks that dotted path attribute-by-attribute instead of using importlib, landing on the function instead of the module. Python 3.11+ switched to pkgutil.resolve_name, which doesn't hit this. Fixed by importing Downloader directly and using patch.object() instead of a string target, in test_engine.py, test_download.py, and test_features.py (12 call sites). - The two TestMultidownloaderDeprecated tests import crawler.py / multidownloader.py, which import selenium unconditionally; CI only installs the [dev] extra, not [google], so these failed on import. Gated both behind pytest.importorskip("selenium"). Also: add a CI badge to README.md, and update AGENTS.md's "no CI" note to describe the new workflow. Closes KTS-o7#28
|
Mixed feelings on this one. The test fix is real and worth merging; the CI workflow itself needs a policy decision first. The However, the workflow itself has issues that need maintainer input before merge:
Suggested split:
The CI work is well-intentioned and the matrix comment about cross-version regressions is fair — it's just that the timing/policy question blocks the merge. |
Add .github/workflows/test.yml: runs pytest (network tests disabled), ruff check, and mypy on every PR and push to main, matrixed across Python 3.8, 3.10, and 3.12. AGENTS.md previously documented "no CI" as a deliberate maintainer choice; this closes that gap with the lightest workflow that catches real cross-version regressions.
While validating the matrix locally (no 3.8 available, so verified 3.10/3.12 in throwaway venvs), found two real version-sensitive bugs the new CI would have caught immediately:
Also: add a CI badge to README.md, and update AGENTS.md's "no CI" note to describe the new workflow.
Closes #28