From 81c6ac4cb5661a8152e57420eda8db2fbe9a75ad Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Thu, 8 Oct 2026 04:21:36 -0700 Subject: [PATCH] Reject empty unittest discovery in contracts CI Replace only the discovery step with explicit bash, pipefail, tee, and a positive Ran-N count check. Command arguments unchanged. C179-W1V-DISCOVERY-01. Scientific effect none. --- .github/workflows/contracts.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contracts.yml b/.github/workflows/contracts.yml index c533ba3..a038669 100644 --- a/.github/workflows/contracts.yml +++ b/.github/workflows/contracts.yml @@ -25,4 +25,8 @@ jobs: with: python-version: '3.11' - name: Run contract and conformance tests - run: python -B -S -m unittest discover -s tests -p 'test_*.py' -v + shell: bash + run: | + set -euo pipefail + python -B -S -m unittest discover -s tests -p 'test_*.py' -v 2>&1 | tee "$RUNNER_TEMP/discovery.log" + grep -Eq '^Ran [1-9][0-9]* tests? in ' "$RUNNER_TEMP/discovery.log" || { echo "::error::unittest discovery collected 0 tests or returned no count"; exit 1; }