potiuk commented on a change in pull request #11656:
URL: https://github.com/apache/airflow/pull/11656#discussion_r507817567
##########
File path: scripts/ci/selective_ci_checks.sh
##########
@@ -121,76 +182,93 @@ function show_changed_files() {
# Output:
# Count of changed files matching the patterns
function count_changed_files() {
+ local count_changed_files
count_changed_files=$(echo "${CHANGED_FILES}" | grep -c -E
"$(get_regexp_from_patterns)" || true)
echo "${count_changed_files}"
}
-function run_all_tests_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
+function check_if_api_tests_should_be_run() {
+ local pattern_array=(
+ "^airflow/api"
+ )
+ show_changed_files
+
+ if [[ $(count_changed_files) == "0" ]]; then
+ needs_api_tests "false"
+ else
+ needs_api_tests "true"
+ fi
+}
+
+function check_if_helm_tests_should_be_run() {
+ local pattern_array=(
+ "^chart"
+ )
+ show_changed_files
+
+ if [[ $(count_changed_files) == "0" ]]; then
+ needs_helm_tests "false"
+ else
+ needs_helm_tests "true"
+ fi
+}
+
+function check_if_docs_should_be_generated() {
+ local pattern_array=(
+ "^docs$"
+ "\.py$"
Review comment:
True!
----------------------------------------------------------------
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]