Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

ci(windows): run the shared CI and release test suites

Rishit Sharma3fa307cee3aa
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dbdc1bc8..ed0b734c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -232,67 +232,22 @@ jobs:
run: python -c "import laya; print(laya.__version__); print(sorted(laya.__all__))"
shell: bash
- # Same suites as the Linux job. Guarded with -f so a suite added by another open branch
- # cannot make this job red on a tree that does not have it yet.
- - name: Routing and language-detection tests
- run: |
- for t in test_router test_criteria test_batch test_predict_long \
- test_structured test_structured_api test_onnx_lang_parity \
- test_download test_verify_checkpoints test_shortlist test_decision_model \
- test_head_checkpointing test_packaging test_doc_tables \
- test_tokenizer_cache test_tokenizer_concurrency test_lazy_import \
- test_runtime_fixes test_lang_guess test_identifier_complexity \
- test_lang_stats test_calibration_persistence test_calibrate test_context_manager \
- test_criteria_normalization test_docker_entrypoint \
- test_empty_questions test_router_memory test_shortlist_cosine \
- test_temperature_loading test_confidence test_cli test_mcp \
- test_mcp_device \
- test_langchain test_portability test_training test_train \
- test_example_server_limits test_blank_lang_routing \
- test_export_onnx_safety test_load_errors test_revision_pinning; do
- if [ -f "tests/$t.py" ]; then python "tests/$t.py"; fi
- done
- shell: bash
-
- - name: Prediction hook tests
- run: |
- python tests/test_hooks.py
- python tests/test_hooks_api.py
- shell: bash
-
- - name: Question token reuse tests
- run: python tests/test_question_token_reuse.py
- shell: bash
-
- # Same pytest suites as the Linux job. They are named explicitly rather than added to
- # the loop above, because the loop runs each file as a script and that is exactly what does
- # not execute a pytest suite (#374).
- - name: Pytest suites (serve, batch, system-one, audit regressions, truncation, compile)
- run: |
- python -m pytest tests/test_serve.py \
- tests/test_router_batch.py \
- tests/test_predict_batch.py \
- tests/test_system_one_lang.py \
- tests/test_audit_regressions.py \
- tests/test_truncation_direction.py \
- tests/test_compile.py \
- -q
- shell: bash
-
# The Linux job's guard, repeated here: the install is what makes test_mcp.py and
# test_langchain.py exercise their real base classes, and nothing else proves it took. mcp
- # and httpx are asserted the same way because their suites skip instead of failing.
+ # and httpx are asserted the same way because their suites skip instead of failing. Run
+ # this before the shared list so a missing extra cannot make the suites silently skip.
- name: Integrations run on their real base classes
run: |
python -c "import mcp, httpx, langchain_core"
python -c "from laya.integrations.langchain import RunnableSerializable; \
assert RunnableSerializable is not object, \
'langchain-core is missing: laya.integrations.langchain fell back to a plain object'"
- python tests/test_langchain_real_mode.py
shell: bash
- - name: Email cleaning tests
- run: python tests/test_email.py
+ # The same canonical list as Linux and the release gate: an inline Windows copy had
+ # omitted 32 suites, and the -f guard silently accepted missing suite files.
+ - name: Test suites
+ run: python scripts/test_suites.py
shell: bash
lint:
diff --git a/tests/test_packaging.py b/tests/test_packaging.py
index fd1a328e..a341cc98 100644
--- a/tests/test_packaging.py
+++ b/tests/test_packaging.py
@@ -329,10 +329,16 @@ untested_suites = [
if f not in EXEMPT_TEST_SUITES and f not in registered_test_files
]
check("ci/wires every non-exempt test suite", untested_suites, [])
-# The point of the shared list is that CI and the publish gate run the same suites. Both invoking
-# the script is the entire mechanism, so assert neither workflow dropped back to an inline list.
-check_true("ci and the release gate share one suite list",
- "scripts/test_suites.py" in workflow and "scripts/test_suites.py" in release_workflow, "")
+# Linux, Windows and the publish gate must invoke the shared list in their own jobs. A mention
+# elsewhere in the workflow (including a comment) cannot prove that a lane runs those suites.
+for label, source, job in (("ci/linux", workflow, "test"),
+ ("ci/windows", workflow, "test-windows"),
+ ("release/build", release_workflow, "build")):
+ job_block = re.search(r"^ %s:\s*\n(.*?)(?=^ [\w-]+:|\Z)" % re.escape(job), source, re.M | re.S)
+ check_true("%s runs the shared suite list" % label,
+ job_block is not None and re.search(r"^\s+run:\s+python scripts/test_suites\.py\s*$",
+ job_block.group(1), re.M) is not None,
+ "expected run: python scripts/test_suites.py in %s" % job)
# -------------------------------------------------- CONTRIBUTING.md's "Running the tests" section