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

nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new cc1136bdffa (chore) ci: exclude integration tests (#11462)
cc1136bdffa is described below

commit cc1136bdffa2b70f20375860443724024bb25c76
Author: Nicolas Filotto <[email protected]>
AuthorDate: Tue Sep 19 13:09:55 2023 +0200

    (chore) ci: exclude integration tests (#11462)
    
    ## Motivation
    
    A change in an integration test where we have a complete project with a pom 
file can be seen as a project to test while we rather expect to test its parent 
project
    
    ## Modifications:
    
    * Exclude integration test project from project root to test
---
 .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