mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Fixed style
This commit is contained in:
parent
0a042fc3f0
commit
0c26f41ac9
@ -321,58 +321,56 @@ class PRInfo:
|
|||||||
for f in self.changed_files
|
for f in self.changed_files
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def can_skip_integration_tests(self, versions: List[str]):
|
||||||
|
if FORCE_TESTS_LABEL in self.labels:
|
||||||
|
return False
|
||||||
|
|
||||||
def can_skip_integration_tests(self, versions: List[str]):
|
# If docker image(s) relevant to integration tests are updated
|
||||||
if FORCE_TESTS_LABEL in self.labels:
|
if any(self.sha in version for version in versions):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# If docker image(s) relevant to integration tests are updated
|
if self.changed_files is None or not self.changed_files:
|
||||||
if any(self.sha in version for version in versions):
|
return False
|
||||||
return False
|
|
||||||
|
|
||||||
if self.changed_files is None or not self.changed_files:
|
if not self.can_skip_builds_and_use_version_from_master():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not self.can_skip_builds_and_use_version_from_master():
|
# Integration tests can be skipped if integration tests are not changed
|
||||||
return False
|
|
||||||
|
|
||||||
# Integration tests can be skipped if integration tests are not changed
|
|
||||||
return not any(
|
|
||||||
f.startswith("tests/integration/") or f == "tests/ci/integration_test_check.py"
|
|
||||||
for f in self.changed_files
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def can_skip_functional_tests(
|
|
||||||
self, version, test_type: Literal["stateless", "stateful"]
|
|
||||||
):
|
|
||||||
if FORCE_TESTS_LABEL in self.labels:
|
|
||||||
return False
|
|
||||||
|
|
||||||
# If docker image(s) relevant to functional tests are updated
|
|
||||||
if self.sha not in version:
|
|
||||||
return False
|
|
||||||
|
|
||||||
if self.changed_files is None or not self.changed_files:
|
|
||||||
return False
|
|
||||||
|
|
||||||
if not self.can_skip_builds_and_use_version_from_master():
|
|
||||||
return False
|
|
||||||
|
|
||||||
# Functional tests can be skipped if queries tests are not changed
|
|
||||||
if test_type == "stateless":
|
|
||||||
return not any(
|
return not any(
|
||||||
f.startswith("tests/queries/0_stateless")
|
f.startswith("tests/integration/") or f == "tests/ci/integration_test_check.py"
|
||||||
or f == "tests/ci/functional_test_check.py"
|
|
||||||
for f in self.changed_files
|
|
||||||
)
|
|
||||||
else: # stateful
|
|
||||||
return not any(
|
|
||||||
f.startswith("tests/queries/1_stateful")
|
|
||||||
or f == "tests/ci/functional_test_check.py"
|
|
||||||
for f in self.changed_files
|
for f in self.changed_files
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def can_skip_functional_tests(
|
||||||
|
self, version, test_type: Literal["stateless", "stateful"]
|
||||||
|
):
|
||||||
|
if FORCE_TESTS_LABEL in self.labels:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# If docker image(s) relevant to functional tests are updated
|
||||||
|
if self.sha not in version:
|
||||||
|
return False
|
||||||
|
|
||||||
|
if self.changed_files is None or not self.changed_files:
|
||||||
|
return False
|
||||||
|
|
||||||
|
if not self.can_skip_builds_and_use_version_from_master():
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Functional tests can be skipped if queries tests are not changed
|
||||||
|
if test_type == "stateless":
|
||||||
|
return not any(
|
||||||
|
f.startswith("tests/queries/0_stateless")
|
||||||
|
or f == "tests/ci/functional_test_check.py"
|
||||||
|
for f in self.changed_files
|
||||||
|
)
|
||||||
|
else: # stateful
|
||||||
|
return not any(
|
||||||
|
f.startswith("tests/queries/1_stateful")
|
||||||
|
or f == "tests/ci/functional_test_check.py"
|
||||||
|
for f in self.changed_files
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class FakePRInfo:
|
class FakePRInfo:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user