diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py b/dev/breeze/src/airflow_breeze/utils/selective_checks.py index 80d2955df68afb..4f9a383a36381a 100644 --- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py +++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py @@ -117,7 +117,10 @@ def __hash__(self): r"^dev/breeze", r"^dev/.*\.py$", r"^Dockerfile", - r"^scripts", + r"^scripts/ci/docker-compose", + r"^scripts/ci/kubernetes", + r"^scripts/docker", + r"^scripts/in_container", r"^generated/provider_dependencies.json$", ], FileGroupForCi.PYTHON_PRODUCTION_FILES: [ diff --git a/dev/breeze/tests/test_selective_checks.py b/dev/breeze/tests/test_selective_checks.py index 1276e625dbb479..d1b47b6a34a7b4 100644 --- a/dev/breeze/tests/test_selective_checks.py +++ b/dev/breeze/tests/test_selective_checks.py @@ -642,6 +642,57 @@ def test_full_test_needed_when_pyproject_toml_changes( assert_outputs_are_printed(expected_outputs, str(stderr)) +@pytest.mark.parametrize( + "files, expected_outputs", + [ + ( + pytest.param( + ("scripts/ci/pre_commit/file.sh",), + { + "full-tests-needed": "false", + }, + id="No full tests needed when pre-commit scripts change", + ) + ), + ( + pytest.param( + ("scripts/docker-compose/test.yml",), + { + "full-tests-needed": "true", + }, + id="Full tests needed when docker-compose changes", + ) + ), + ( + pytest.param( + ("scripts/ci/kubernetes/some_file.txt",), + { + "full-tests-needed": "true", + }, + id="Full tests needed when ci/kubernetes changes", + ) + ), + ( + pytest.param( + ("scripts/in_container/script.sh",), + { + "full-tests-needed": "true", + }, + id="Full tests needed when in_container script changes", + ) + ), + ], +) +def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_outputs: dict[str, str]): + stderr = SelectiveChecks( + files=files, + github_event=GithubEvents.PULL_REQUEST, + commit_ref="HEAD", + default_branch="main", + ) + assert_outputs_are_printed(expected_outputs, str(stderr)) + + @pytest.mark.parametrize( "files, pr_labels, default_branch, expected_outputs,", [