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; }