You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/11/14 09:02:03 UTC
[airflow] 06/07: fixup! Selective tests - depends on files changed
in the commit. (#11417)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit f74d0304bcd3fdc53800d04cb6859046122e4b31
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sat Nov 14 09:41:51 2020 +0100
fixup! Selective tests - depends on files changed in the commit. (#11417)
---
scripts/ci/selective_tests.sh | 103 ++----------------------------------------
1 file changed, 3 insertions(+), 100 deletions(-)
diff --git a/scripts/ci/selective_tests.sh b/scripts/ci/selective_tests.sh
index 66cf709..c01331a 100755
--- a/scripts/ci/selective_tests.sh
+++ b/scripts/ci/selective_tests.sh
@@ -61,7 +61,7 @@ function output_all_basic_variables() {
function set_outputs_run_all_tests() {
initialization::ga_output run-tests "true"
initialization::ga_output run-kubernetes-tests "true"
- initialization::ga_output test-types "Core Other API CLI Providers WWW Integration Heisentests"
+ initialization::ga_output test-types "Core"
}
function set_output_skip_all_tests() {
@@ -197,72 +197,6 @@ function get_count_all_files() {
readonly COUNT_ALL_CHANGED_FILES
}
-function get_count_api_files() {
- echo
- echo "Count API files"
- echo
- API_TRIGGERING_PATTERNS=(
- "^airflow/api"
- "^airflow/api_connexion"
- "^tests/api"
- "^tests/api_connexion"
- )
- readonly API_TRIGGERING_PATTERNS
- pattern_array=("${API_TRIGGERING_PATTERNS[@]}")
- show_changed_files
- COUNT_API_CHANGED_FILES=$(count_changed_files)
- echo "Files count: ${COUNT_API_CHANGED_FILES}"
- readonly COUNT_API_CHANGED_FILES
-}
-
-function get_count_cli_files() {
- echo
- echo "Count CLI files"
- echo
- CLI_TRIGGERING_PATTERNS=(
- "^airflow/cli"
- "^tests/cli"
- )
- readonly CLI_TRIGGERING_PATTERNS
- pattern_array=("${CLI_TRIGGERING_PATTERNS[@]}")
- show_changed_files
- COUNT_CLI_CHANGED_FILES=$(count_changed_files)
- echo "Files count: ${COUNT_CLI_CHANGED_FILES}"
- readonly COUNT_CLI_CHANGED_FILES
-}
-
-function get_count_providers_files() {
- echo
- echo "Count Providers files"
- echo
- PROVIDERS_TRIGGERING_PATTERNS=(
- "^airflow/providers"
- "^tests/providers"
- )
- readonly PROVIDERS_TRIGGERING_PATTERNS
- pattern_array=("${PROVIDERS_TRIGGERING_PATTERNS[@]}")
- show_changed_files
- COUNT_PROVIDERS_CHANGED_FILES=$(count_changed_files)
- echo "Files count: ${COUNT_PROVIDERS_CHANGED_FILES}"
- readonly COUNT_PROVIDERS_CHANGED_FILES
-}
-
-function get_count_www_files() {
- echo
- echo "Count WWW files"
- echo
- WWW_TRIGGERING_PATTERNS=(
- "^airflow/www"
- "^tests/www"
- )
- readonly WWW_TRIGGERING_PATTERNS
- pattern_array=("${WWW_TRIGGERING_PATTERNS[@]}")
- show_changed_files
- COUNT_WWW_CHANGED_FILES=$(count_changed_files)
- echo "Files count: ${COUNT_WWW_CHANGED_FILES}"
- readonly COUNT_WWW_CHANGED_FILES
-}
-
function get_count_kubernetes_files() {
echo
echo "Count Kubernetes files"
@@ -284,9 +218,7 @@ function calculate_test_types_to_run() {
echo
echo "Count Core/Other files"
echo
- COUNT_CORE_OTHER_CHANGED_FILES=$((COUNT_ALL_CHANGED_FILES - COUNT_WWW_CHANGED_FILES - \
- COUNT_PROVIDERS_CHANGED_FILES - COUNT_CLI_CHANGED_FILES - COUNT_API_CHANGED_FILES - \
- COUNT_KUBERNETES_CHANGED_FILES))
+ COUNT_CORE_OTHER_CHANGED_FILES=$((COUNT_ALL_CHANGED_FILES - COUNT_KUBERNETES_CHANGED_FILES))
readonly COUNT_CORE_OTHER_CHANGED_FILES
echo
@@ -306,32 +238,7 @@ function calculate_test_types_to_run() {
initialization::ga_output run-kubernetes-tests "false"
fi
initialization::ga_output run-tests "true"
- SELECTED_TESTS=""
- if [[ ${COUNT_API_CHANGED_FILES} != "0" ]]; then
- echo
- echo "Adding API to selected files as ${COUNT_API_CHANGED_FILES} API files changed"
- echo
- SELECTED_TESTS="${SELECTED_TESTS} API"
- fi
- if [[ ${COUNT_CLI_CHANGED_FILES} != "0" ]]; then
- echo
- echo "Adding CLI to selected files as ${COUNT_CLI_CHANGED_FILES} CLI files changed"
- echo
- SELECTED_TESTS="${SELECTED_TESTS} CLI"
- fi
- if [[ ${COUNT_PROVIDERS_CHANGED_FILES} != "0" ]]; then
- echo
- echo "Adding Providers to selected files as ${COUNT_PROVIDERS_CHANGED_FILES} Provider files changed"
- echo
- SELECTED_TESTS="${SELECTED_TESTS} Providers"
- fi
- if [[ ${COUNT_WWW_CHANGED_FILES} != "0" ]]; then
- echo
- echo "Adding WWW to selected files as ${COUNT_WWW_CHANGED_FILES} WWW files changed"
- echo
- SELECTED_TESTS="${SELECTED_TESTS} WWW"
- fi
- initialization::ga_output test-types "Integration Heisentests ${SELECTED_TESTS}"
+ initialization::ga_output test-types "Integration Heisentests Core"
fi
}
@@ -341,9 +248,5 @@ initialize_git_repo
check_if_tests_should_be_run_at_all
check_if_environment_files_changed
get_count_all_files
-get_count_api_files
-get_count_cli_files
-get_count_providers_files
-get_count_www_files
get_count_kubernetes_files
calculate_test_types_to_run