This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 90776562809 refactor: Ignore if db test collecting failed due to no
tests available (#64222)
90776562809 is described below
commit 9077656280919508e8abc626ef13d90f47e05c91
Author: David Blain <[email protected]>
AuthorDate: Wed Mar 25 23:34:55 2026 +0100
refactor: Ignore if db test collecting failed due to no tests available
(#64222)
---
scripts/ci/testing/run_unit_tests.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/scripts/ci/testing/run_unit_tests.sh
b/scripts/ci/testing/run_unit_tests.sh
index 3a4069cdf07..f53a8b64522 100755
--- a/scripts/ci/testing/run_unit_tests.sh
+++ b/scripts/ci/testing/run_unit_tests.sh
@@ -102,7 +102,12 @@ function providers_tests() {
exit 1
fi
set -e
- if [[ ${RESULT} != "0" ]]; then
+ # If pytest returns exit code 1 (no tests collected) for DB-only runs,
treat it as success
+ # to avoid failing CI when there are simply no DB tests defined for the
group.
+ if [[ ${RESULT} == "1" && "${TEST_SCOPE}" == "DB" ]]; then
+ echo
+ echo "${COLOR_YELLOW}No DB tests were collected for ${TEST_GROUP};
treating as success.${COLOR_RESET}"
+ elif [[ ${RESULT} != "0" ]]; then
echo
echo "${COLOR_RED}The ${TEST_GROUP} test ${TEST_SCOPE} failed! Giving
up${COLOR_RESET}"
echo