]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🐛 Accept any base test failure as regression (#16092)
authorSebastián Ramírez <tiangolo@gmail.com>
Tue, 28 Jul 2026 13:47:58 +0000 (15:47 +0200)
committerGitHub <noreply@github.com>
Tue, 28 Jul 2026 13:47:58 +0000 (13:47 +0000)
.github/workflows/test.yml

index cdd870a1ae5bcfc84c2aba73e2856d842d1f64ba..b5798dd37884aec4167b7a031450338adbf2c5fd 100644 (file)
@@ -262,20 +262,16 @@ jobs:
           git apply "$RUNNER_TEMP/tests.patch"
           uv sync --locked --no-dev --group tests --extra all
           set +e
-          mapfile -d '' -t changed_tests < "$RUNNER_TEMP/changed-tests"
-          uv run --no-sync pytest -- "${changed_tests[@]}"
+          xargs -0 uv run --no-sync pytest -- < "$RUNNER_TEMP/changed-tests"
           status=$?
           set -e
           if [ "$status" -eq 0 ]; then
             echo "::warning::The changed tests already pass on the base revision. Check whether the fix is still needed."
             echo "### Regression proof: base already passes :warning:" >> "$GITHUB_STEP_SUMMARY"
             echo "The changed tests pass without the pull request's code changes." >> "$GITHUB_STEP_SUMMARY"
-          elif [ "$status" -eq 1 ]; then
-            echo "The changed tests fail on the base revision as expected."
-            echo "### Regression proof: base fails as expected :white_check_mark:" >> "$GITHUB_STEP_SUMMARY"
           else
-            echo "::error::The base test run was inconclusive (pytest exit code $status)."
-            exit "$status"
+            echo "The changed tests fail on the base revision as expected (pytest exit code $status)."
+            echo "### Regression proof: base fails as expected :white_check_mark:" >> "$GITHUB_STEP_SUMMARY"
           fi
   coverage-combine:
     needs: