Browse Source

🐛 Accept any base test failure as regression (#16092)

pull/16093/head
Sebastián Ramírez 1 week ago
committed by GitHub
parent
commit
d3cd6054e4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      .github/workflows/test.yml

10
.github/workflows/test.yml

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

Loading…
Cancel
Save