From fb85b4b60cf47fcf6809fb68e91d715c0cfe70dd Mon Sep 17 00:00:00 2001 From: Ken Schlobohm Date: Wed, 21 Oct 2026 09:04:08 -0500 Subject: [PATCH 1/3] ci: shorten test runs with two workers and faster fixture shutdown Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 258e835c-9f3b-49d2-bd15-16fb97e12ca5 --- .github/security-audit-requirements.txt | 13 +++++++++++++ .github/workflows/test.yml | 2 +- pyproject.toml | 1 + .../integrations/test_installed_adapters.py | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/security-audit-requirements.txt b/.github/security-audit-requirements.txt index d542924487..7e7132482a 100644 --- a/.github/security-audit-requirements.txt +++ b/.github/security-audit-requirements.txt @@ -318,6 +318,12 @@ cryptography==50.0.2 \ --hash=sha256:fa8f5efb344d6908a1ce62f4a24e2e5780f825d6f53f5f50ec5ffacac72936cb \ --hash=sha256:fdd28f912fccfec1846a94e2e1e8f9b0012f557f0c46fe4f3eb0d7a87afcf90b # via pyjwt +execnet==2.1.2 \ + --hash=md5:057396dce2b1627b57220d53017a940e \ + --hash=md5:d2dd795604b192dae2cc033757da2ab6 \ + --hash=sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd \ + --hash=sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec + # via pytest-xdist h11==0.16.0 ; sys_platform != 'emscripten' \ --hash=sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1 \ --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 @@ -543,10 +549,17 @@ pytest==9.1.1 \ # via # specify-cli (pyproject.toml) # pytest-cov + # pytest-xdist pytest-cov==7.1.0 \ --hash=sha256:30674f2b5f6351aa09702a9c8c364f6a01c27aae0c1366ae8016160d1efc56b2 \ --hash=sha256:a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678 # via specify-cli (pyproject.toml) +pytest-xdist==3.8.0 \ + --hash=md5:3864dd9f3061eae26e895b4e455f2acc \ + --hash=md5:9ead4effcd1eba423610acd10d725aad \ + --hash=sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88 \ + --hash=sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1 + # via specify-cli (pyproject.toml) python-multipart==0.0.32 \ --hash=sha256:be54b7f3fa167bb83e4fcd936b887b708f4e57fe75911c02aebf53efaf8d938e \ --hash=sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dceb97c6e5..578fb5ade3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,4 +52,4 @@ jobs: # because it cannot handle native Windows paths in test fixtures. # See tests/conftest.py::_has_working_bash() for details. - name: Run tests - run: uv run pytest + run: uv run pytest -n 2 diff --git a/pyproject.toml b/pyproject.toml index ccc0d97aa2..7cdecced2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ packages = ["src/specify_cli"] test = [ "pytest>=7.0", "pytest-cov>=4.0", + "pytest-xdist>=3.0", ] [tool.pytest.ini_options] diff --git a/tests/specify_cli/integrations/test_installed_adapters.py b/tests/specify_cli/integrations/test_installed_adapters.py index 0c1bb0a60a..fe74ec82e0 100644 --- a/tests/specify_cli/integrations/test_installed_adapters.py +++ b/tests/specify_cli/integrations/test_installed_adapters.py @@ -104,7 +104,7 @@ def log_message(self, *args): pass http = ThreadingHTTPServer(("127.0.0.1", 0), partial(Handler, directory=str(downloads))) - thread = threading.Thread(target=http.serve_forever, daemon=True) + thread = threading.Thread(target=http.serve_forever, kwargs={"poll_interval": 0.01}, daemon=True) thread.start() result = SimpleNamespace( root=downloads, url=f"http://127.0.0.1:{http.server_port}", requests=requests, From 8d4d6c5aa9d653b2d82e6dcd64e86296735bb072 Mon Sep 17 00:00:00 2001 From: Ken Schlobohm Date: Wed, 21 Oct 2026 09:10:32 -0500 Subject: [PATCH 2/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/security-audit-requirements.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/security-audit-requirements.txt b/.github/security-audit-requirements.txt index 7e7132482a..ae34c41f31 100644 --- a/.github/security-audit-requirements.txt +++ b/.github/security-audit-requirements.txt @@ -319,8 +319,6 @@ cryptography==50.0.2 \ --hash=sha256:fdd28f912fccfec1846a94e2e1e8f9b0012f557f0c46fe4f3eb0d7a87afcf90b # via pyjwt execnet==2.1.2 \ - --hash=md5:057396dce2b1627b57220d53017a940e \ - --hash=md5:d2dd795604b192dae2cc033757da2ab6 \ --hash=sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd \ --hash=sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec # via pytest-xdist From 047c464bc1a4eba68ac0906c34c6088a675ecd51 Mon Sep 17 00:00:00 2001 From: Ken Schlobohm Date: Wed, 21 Oct 2026 09:10:45 -0500 Subject: [PATCH 3/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/security-audit-requirements.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/security-audit-requirements.txt b/.github/security-audit-requirements.txt index ae34c41f31..b5feaee1a7 100644 --- a/.github/security-audit-requirements.txt +++ b/.github/security-audit-requirements.txt @@ -553,8 +553,6 @@ pytest-cov==7.1.0 \ --hash=sha256:a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678 # via specify-cli (pyproject.toml) pytest-xdist==3.8.0 \ - --hash=md5:3864dd9f3061eae26e895b4e455f2acc \ - --hash=md5:9ead4effcd1eba423610acd10d725aad \ --hash=sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88 \ --hash=sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1 # via specify-cli (pyproject.toml)