From 958d1d41be7700cfb6143eeb4026cd8644125159 Mon Sep 17 00:00:00 2001 From: kunkunblueberry Date: Sat, 7 Nov 2026 00:54:11 +0800 Subject: [PATCH] [ci] check generated contracts before the Python suite The contract check sat after the tests with the default success() condition, so a failing or hanging Python run skipped it silently - that is what happened in run 42224427798, where the contracts, build, wheel and browser steps were all skipped behind a stuck test. It now runs first, after dependency installation, so a test failure can no longer hide a stale checked-in contract. The earlier job split is dropped: main's #164 bounded the hang, and one job with a deterministic order is the simpler thing to maintain for now. --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e09285f..90e16e73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,10 +49,12 @@ jobs: run: npm run check:i18n - name: Check layer imports run: lint-imports - - name: Python tests - run: python -m pytest tests -q -ra + # Runs before the Python suite: a failing or hanging test run must not hide + # whether the checked-in contracts still match the models. - name: Check generated contracts run: python scripts/generate_contracts.py --check + - name: Python tests + run: python -m pytest tests -q -ra - name: Production build run: npm run build - name: Verify installed wheel without Node.js