Skip to content

Commit 9a958c1

Browse files
gnodetclaude
andauthored
ci: fix incremental build to test dependents of test-infra modules (#22514)
The incremental build script classified modules as "testable" only when they had a src/test directory. Modules with only src/main (like test-infra/* modules) were treated as pom-only and their dependents were not tested with -amd. This meant changes to test infrastructure (e.g. container version bumps) never triggered integration tests in consuming modules like camel-infinispan. Fix by checking for src/main instead of src/test. Modules with source code should trigger dependent testing; only true pom-only modules (parent, aggregator poms) should be excluded from -amd expansion. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 19faac1 commit 9a958c1

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/actions/incremental-build/incremental-build.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -587,17 +587,19 @@ main() {
587587
fi
588588

589589
# ── Step 3: Merge and deduplicate ──
590-
# Separate file-path modules into testable (has src/test) and pom-only.
591-
# Pom-only modules (e.g. "parent") are kept in the build list but must NOT
592-
# be expanded with -amd, since that would pull in every dependent module.
590+
# Separate file-path modules into testable (has source code) and pom-only.
591+
# Pom-only modules (e.g. "parent", aggregator poms) are kept in the build
592+
# list but must NOT be expanded with -amd, since that would pull in every
593+
# dependent module. Modules with src/main (including test-infra modules)
594+
# are treated as testable so their dependents get tested.
593595
local testable_pl=""
594596
local pom_only_pl=""
595597
for w in $(echo "$pl" | tr ',' '\n'); do
596-
if [ -d "$w/src/test" ]; then
598+
if [ -d "$w/src/main" ]; then
597599
testable_pl="${testable_pl:+${testable_pl},}${w}"
598600
else
599601
pom_only_pl="${pom_only_pl:+${pom_only_pl},}${w}"
600-
echo " Pom-only module (no src/test, won't expand dependents): $w"
602+
echo " Pom-only module (no src/main, won't expand dependents): $w"
601603
fi
602604
done
603605

0 commit comments

Comments
 (0)