Subject: [PATCH] ci: enable EXPENSIVE for contributor builds

From: Junio C Hamano <[email-masked]>
Date: Mon, 11 May 2026 08:51:15 +0900

Earlier, we enabled EXPENSIVE tests for pushes to integration
branches. As we didn't have any CI jobs that run these tests, this
was a step in the right direction.

It however is an ineffective and inefficient use of the maintainer
time, which does not scale, to allow contributors to send changes
that are less tested at the list, only to force the maintainer
notice breakages caused by their changes but only after these
changes are mixed with changes from other contributors.  The
problematic topic needs to be isolated by bisecting, and it
historically has been done by the maintainer alone.

It is far better to let the problem identified early, preferably
before the problematic code leaves the hands of the original
developer.  In order for it to happen, the test coverage of the
contributor tests must be at least as wide as the coverage of the
integration tests.

Enable expensive tests for CI jobs triggered by pull requests.  This
will make each contributor take care of their own, which scales much
better.

Keep the expensive tests also enabled for the pushes of integration
branches, as that is the only place we can notice problems stemming
from mismerges and inter-topic interactions, even if the topics from
the contributors in isolation all passes these tests.

Signed-off-by: Junio C Hamano <[email-masked]>
---
 * This is to be applied on top of "ci: run expensive tests on push
   builds to integration branches", currently sitting at the tip of
   the js/objects-larger-than-4gb-on-windows topic.
---
 ci/lib.sh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/ci/lib.sh b/ci/lib.sh
index a671994bdf..4ca3ecef2c 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -314,11 +314,13 @@ export DEFAULT_TEST_TARGET=prove
 export GIT_TEST_CLONE_2GB=true
 export SKIP_DASHED_BUILT_INS=YesPlease
 
-# Enable expensive tests on push builds to integration branches, but
-# not on PR builds where the extra time is not justified for every
-# iteration.
+# In order to give maximum test coverage to contributor builds,
+# preferrably even before the changes consume public review bandwidth,
+# enable "expensive" tests for PR events.
+# In order to catch bugs introduced at integration time by mismerges,
+# enable the long tests for pushes to the integration branches as well.
 case "$GITHUB_EVENT_NAME,$CI_BRANCH" in
-push,*next*|push,*master*|push,*main*|push,*maint*)
+pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)
 	export GIT_TEST_LONG=YesPlease
 	;;
 esac
-- 
2.54.0-162-gf1ca62098f