ashb commented on a change in pull request #11541:
URL: https://github.com/apache/airflow/pull/11541#discussion_r505410738



##########
File path: scripts/ci/selective_tests.sh
##########
@@ -125,18 +182,60 @@ function count_changed_files() {
     echo "${count_changed_files}"
 }
 
-function run_all_tests_when_push_or_schedule() {
+function run_everything_when_push_or_schedule() {
     if [[ ${GITHUB_EVENT_NAME} == "push" || ${GITHUB_EVENT_NAME} == "schedule" 
]]; then
         echo
         echo "Always run all tests in case of push/schedule events"
         echo
-        set_outputs_run_all_tests
-        exit
+        set_outputs_run_everything_and_exit
+    fi
+}
+
+function check_if_api_tests_should_be_run() {
+    local api_triggering_patterns=(
+        "^airflow/api"
+    )
+    pattern_array=("${api_triggering_patterns[@]}")
+    show_changed_files "$(get_regexp_from_patterns)"
+
+    if [[ $(count_changed_files) == "0" ]]; then
+        does_not_need_api_tests
+    else
+        needs_api_tests
+    fi
+}
+
+function check_if_helm_tests_should_be_run() {
+    local helm_triggering_patterns=(
+        "^chart"
+    )
+    pattern_array=("${helm_triggering_patterns[@]}")
+    show_changed_files "$(get_regexp_from_patterns)"
+
+    if [[ $(count_changed_files) == "0" ]]; then
+        does_not_need_helm_tests
+    else
+        needs_helm_tests
+    fi
+}
+
+function check_if_docs_should_be_generated() {
+    local docs_triggering_patterns=(
+        "^docs$"
+        "\.py$"

Review comment:
       ```suggestion
           "\.py$"
           "^CHANGELOG\.txt"
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to