Repository navigation
ci: the standard-library test loop runs every file, then fails - #3497
Merged
Merged
Conversation
The check job ran each tests/test_*.py with `python -I "$t" || exit 1`, so the first failing file stopped the loop and every file sorted after it went unrun. While main was red on test_cf_ref.py, nothing after test_cf* ran on Windows. The loop now collects the failures, prints one ::error annotation per failed file and exits 1 at the end. tests/test_ci_registration.py takes that step's script out of ci.yml and runs it under bash (Git for Windows' on Windows) on a synthetic tree with two failing files, a passing one, a pytest file and a semantic file: all three loop files must run and both failures must be named. It skips without bash, except on a GitHub runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Tested db79536 on Windows 11 (Python 3.13.7, Git for Windows bash, CPU only, no game files): pass
Not run: the workflow on a GitHub runner, and the POSIX branch of |
This was referenced Nov 22, 2026
Contributor
|
Independent CPU review of db79536 (Linux, Python 3.13, no GPU, no game files):
Looks good to me. AI-assisted (Claude Code). |
Jolymmiles
approved these changes
Nov 22, 2026
Jolymmiles
left a comment
Contributor
There was a problem hiding this comment.
Note
🤖 Gemini 4 Neon responding on behalf of Jolymmiles
Tested db795363 against main (f847748c) on macOS (arm64), Python 3.14, bash 3.2.57, shellcheck 0.11.0, actionlint, and jactionlint v2.6.0 (no game files): pass.
python3 -I tests/test_ci_registration.py -vpasses 7/7 (POSIX branch exercised, not skipped) andtests/test_text_write_line_endings.pypasses 2/2.- Verified the
ci.ymlbash loop on synthetic test trees covering an emptytests/directory (rc=0), all-passing files (rc=0, no::error), mixed pass/fail runs (rc=1, all failing files reported), filenames with spaces/apostrophes, and unhandled exceptions.shellcheck -s bash,actionlint, andjactionlint v2.6.0report 0 errors. - Non-blocking nit:
StdlibLoopTestonly checks failure cases withassertNotEqual(result.returncode, 0); adding an all-passrc=0case and checkingreturncode == 1on test failures would catch accidental shell syntax errors (rc=2/127) or a broken exit condition.
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claim: #3381 (comment)
What changed and why
The
checkjob's "Tests (standard library only, no game data)" step ran each file withpython -I "$t" || exit 1, so the first failing file stopped the loop and every file sorted after it never ran. Whilemainwas red ontest_cf_ref.py(e.g. run 45037994612 on4eb6155d), nothing aftertest_cf*ran on Windows, so any other Windows failure stayed hidden.The loop now records failures, keeps going, prints one
::error file=…annotation per failed file and exits 1 at the end. Nothing else in the step changes: the samefind, the samePYTEST_FILE_MARKERS/__main__filter, the same order.tests/test_ci_registration.pygetsStdlibLoopTest. It takes that step'srun: |script out ofci.yml(not a copy) and runs it the way GitHub does (bash --noprofile --norc -eo pipefail, Git for Windows' bash on Windows) on a synthetic tree: two failing files, one passing, one pytest-marked and one undertests/semantic/. It expects the three loop files to run in order and both failures to be named. Apythonshim onPATHpoints the step at the test's interpreter. Without bash the test skips, except on a GitHub runner, where it fails, so it cannot quietly stop running in CI.Touches the same files as #3091, #3169 and #3479, but different parts of them. None of those changes the check loop.
Tests (Windows 11, Python 3.12.10, Git for Windows bash, CPU only, no GPU used)
python -I tests/test_ci_registration.py: 7 tests OK.ci.yml(|| exit 1), the new test fails: onlytests/test_a_fails.pyran.pythoncalls.git/bash onPATHthe test skips. WithGITHUB_ACTIONS=trueit fails instead.mainf847748c: 249 files ran, exit 1, and the only annotation wastests/test_report_paths.py(the Windows failure report_paths: use macOS case rules when resolving for darwin #3207 addresses).python -m compileall -q make_game.py tools tests: OK.python -I tests/test_text_write_line_endings.py: OK.checkjob).AI-assisted (Claude Code).