Skip to content

Commit 599b0f0

Browse files
gnodetclaude
andcommitted
ci: use src/main instead of src/test for -amd expansion classification
Modules with src/main (including test-infra modules) are now treated as testable for -amd expansion, so their dependents get tested. Previously the check used src/test, which excluded test-infra modules that have source code but no tests — their dependent components were never tested. Fixes the issue seen in PR apache#22316 where bumping the Infinispan container version didn't trigger camel-infinispan tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b40772d commit 599b0f0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

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

550550
# ── Step 3: Merge and deduplicate ──
551-
# Separate file-path modules into testable (has src/test) and pom-only.
552-
# Pom-only modules (e.g. "parent") are kept in the build list but must NOT
553-
# be expanded with -amd, since that would pull in every dependent module.
551+
# Separate file-path modules into testable (has source code) and pom-only.
552+
# Pom-only modules (e.g. "parent", aggregator poms) are kept in the build
553+
# list but must NOT be expanded with -amd, since that would pull in every
554+
# dependent module. Modules with src/main (including test-infra modules)
555+
# are treated as testable so their dependents get tested.
554556
local testable_pl=""
555557
local pom_only_pl=""
556558
for w in $(echo "$pl" | tr ',' '\n'); do
557-
if [ -d "$w/src/test" ]; then
559+
if [ -d "$w/src/main" ]; then
558560
testable_pl="${testable_pl:+${testable_pl},}${w}"
559561
else
560562
pom_only_pl="${pom_only_pl:+${pom_only_pl},}${w}"
561-
echo " Pom-only module (no src/test, won't expand dependents): $w"
563+
echo " Pom-only module (no src/main, won't expand dependents): $w"
562564
fi
563565
done
564566

0 commit comments

Comments
 (0)