@@ -83,22 +83,6 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
8383 if [[ -n " $service_changes " ]]; then
8484 echo -e " \n>> Detected changes in $service service"
8585
86- # If lint or test fails for a service, we skip it and continue to the next one
87- make lint skip-non-generated-files=true service=$service || {
88- echo " ! Linting failed for $service . THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
89- continue
90- }
91- # Our unit test template fails because it doesn't support fields with validations,
92- # such as the UUID component used by IaaS. We introduce this hardcoded skip until we fix it
93- if [ " ${service} " = " iaas" ] || [ " ${service} " = " iaasalpha" ]; then
94- echo " >> Skipping tests of $service service"
95- else
96- make test skip-non-generated-files=true service=$service || {
97- echo " ! Testing failed for $service . THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
98- continue
99- }
100- fi
101-
10286 if [[ " $BRANCH_PREFIX " != " main" ]]; then
10387 git switch main # This is needed to create a new branch for the service without including the previously committed files
10488 branch=" $BRANCH_PREFIX /$service "
@@ -116,6 +100,22 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
116100 git add go.work
117101 fi
118102
103+ # If lint or test fails for a service, we skip it and continue to the next one
104+ make lint skip-non-generated-files=true service=$service || {
105+ echo " ! Linting failed for $service . THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
106+ continue
107+ }
108+ # Our unit test template fails because it doesn't support fields with validations,
109+ # such as the UUID component used by IaaS. We introduce this hardcoded skip until we fix it
110+ if [ " ${service} " = " iaas" ] || [ " ${service} " = " iaasalpha" ]; then
111+ echo " >> Skipping tests of $service service"
112+ else
113+ make test skip-non-generated-files=true service=$service || {
114+ echo " ! Testing failed for $service . THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
115+ continue
116+ }
117+ fi
118+
119119 if [[ " $branch " != " main" ]]; then
120120 echo " >> Creating PR for $service "
121121 git commit -m " Generate $service "
0 commit comments