This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch exclude-integration-tests-4.0
in repository https://gitbox.apache.org/repos/asf/camel.git

commit effe4fbea28f763129c7f609956d612002d9009b
Author: Nicolas Filotto <nfilo...@talend.com>
AuthorDate: Tue Sep 19 13:05:47 2023 +0200

    (chore) ci: exclude integration tests
---
 .github/actions/incremental-build/incremental-build.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/.github/actions/incremental-build/incremental-build.sh 
b/.github/actions/incremental-build/incremental-build.sh
index a8ad77a476a..b5e29a444fd 100755
--- a/.github/actions/incremental-build/incremental-build.sh
+++ b/.github/actions/incremental-build/incremental-build.sh
@@ -22,8 +22,14 @@ maxNumberOfTestableProjects=50
 
 function findProjectRoot () {
   local path=${1}
-  while [[ "$path" != "." && ! -e "$path/pom.xml" ]]; do
-    path=$(dirname $path)
+  while [[ "$path" != "." ]]; do
+    if [[ ! -e "$path/pom.xml" ]] ; then
+      path=$(dirname $path)
+    elif [[ $(dirname $path) == */src/it ]] ; then
+      path=$(dirname $(dirname $path))
+    else
+      break
+    fi
   done
   echo "$path"
 }
@@ -58,7 +64,7 @@ function main() {
       local projectRoot
       projectRoot=$(findProjectRoot ${project})
       if [[ ${projectRoot} = "." ]] ; then
-        echo "There root project is affected, so a complete build is triggered"
+        echo "The root project is affected, so a complete build is triggered"
         buildAll=true
       elif [[ ${projectRoot} != "${lastProjectRoot}" ]] ; then
         (( totalAffected ++ ))

Reply via email to