Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class FileGroupForCi(Enum):
JAVASCRIPT_PRODUCTION_FILES = "javascript_scans"
ALWAYS_TESTS_FILES = "always_test_files"
API_FILES = "api_files"
GIT_PROVIDER_FILES = "git_provider_files"
API_CODEGEN_FILES = "api_codegen_files"
HELM_FILES = "helm_files"
DEPENDENCY_FILES = "dependency_files"
Expand Down Expand Up @@ -169,6 +170,9 @@ def __hash__(self):
r"^airflow-core/tests/unit/api/",
r"^airflow-core/tests/unit/api_fastapi/",
],
FileGroupForCi.GIT_PROVIDER_FILES: [
r"^providers/git/src/",
],
FileGroupForCi.API_CODEGEN_FILES: [
r"^airflow-core/src/airflow/api_fastapi/core_api/openapi/.*generated\.yaml",
r"^clients/gen",
Expand Down Expand Up @@ -531,6 +535,16 @@ def full_tests_needed(self) -> bool:
):
get_console().print("[warning]Running full set of tests because api files changed[/]")
return True
if self._matching_files(
FileGroupForCi.GIT_PROVIDER_FILES,
CI_FILE_GROUP_MATCHES,
):
# TODO(potiuk): remove me when we get rid of the dependency
get_console().print(
"[warning]Running full set of tests because git provider files changed "
"and for now we have core tests depending on them.[/]"
)
return True
if self._matching_files(
FileGroupForCi.TESTS_UTILS_FILES,
CI_FILE_GROUP_MATCHES,
Expand Down
35 changes: 35 additions & 0 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,41 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_
@pytest.mark.parametrize(
"files, pr_labels, default_branch, expected_outputs,",
[
(
pytest.param(
("providers/git/src/airflow/providers/git/test_file.py",),
(),
"main",
{
"selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"all-versions": "false",
"mysql-versions": "['8.0']",
"postgres-versions": "['13']",
"python-versions": "['3.9']",
"python-versions-list-as-string": "3.9",
"kubernetes-versions": "['v1.29.12']",
"kubernetes-versions-list-as-string": "v1.29.12",
"kubernetes-combos-list-as-string": "3.9-v1.29.12",
"ci-image-build": "true",
"prod-image-build": "true",
"run-tests": "true",
"skip-providers-tests": "false",
"docs-build": "true",
"docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
"full-tests-needed": "true",
"skip-pre-commits": ALL_SKIPPED_COMMITS_BY_DEFAULT_ON_ALL_TESTS_NEEDED,
"upgrade-to-newer-dependencies": "false",
"core-test-types-list-as-strings-in-json": ALL_CI_SELECTIVE_TEST_TYPES_AS_JSON,
"providers-test-types-list-as-strings-in-json": ALL_PROVIDERS_SELECTIVE_TEST_TYPES_AS_JSON,
"needs-mypy": "true",
"mypy-checks": ALL_MYPY_CHECKS,
},
id="Everything should run including all providers when git provider is changed"
"(special case for now)",
)
),
(
pytest.param(
("INTHEWILD.md",),
Expand Down
Loading