Skip to content

Commit 0b15cde

Browse files
committed
Add tests to always be executed in selective testing
1 parent 8ae6c20 commit 0b15cde

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/scripts/selective-testing/compute-selected-tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
".github/CODEOWNERS": ["tests/sentry/api/test_api_owners.py"],
3636
}
3737

38+
# Tests that should always be run, even if no files are changed.
39+
TESTS_TO_ALWAYS_RUN: set[str] = {
40+
"tests/sentry/taskworker/test_config.py",
41+
}
42+
3843

3944
def _matches_trigger(file_path: str, trigger: str | re.Pattern[str]) -> bool:
4045
if isinstance(trigger, re.Pattern):
@@ -164,6 +169,9 @@ def main() -> int:
164169
print(f"Including {len(existing_changed_test_files)} directly changed test files")
165170
affected_test_files.update(existing_changed_test_files)
166171

172+
# Include tests that should always be run
173+
affected_test_files.update(TESTS_TO_ALWAYS_RUN)
174+
167175
# Filter out any test files found via coverage lookup that no longer exist
168176
# (e.g. a deleted test file that covered the same source as another changed file).
169177
existing_files = {f for f in affected_test_files if Path(f).exists()}

0 commit comments

Comments
 (0)