Skip to content

Commit 3515d18

Browse files
authored
ref(selective testing): exclude tests/sentry/test_wsgi.py (#108198)
tests/sentry/test_wsgi.py is selected very frequently since it covers the majority of app warmup, and is almost never actually relevant to changed files
1 parent 6d82fc6 commit 3515d18

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
re.compile(r"/migrations/\d{4}_[^/]+\.py$"),
2121
]
2222

23+
# These test files are excluded if they aren't explicitly modified.
24+
EXCLUDED_TEST_FILES: set[str] = {
25+
# this is selected very frequently since it covers the majority of
26+
# app warmup, and is almost never actually relevant to changed files
27+
"tests/sentry/test_wsgi.py",
28+
}
29+
2330

2431
def _matches_trigger(file_path: str, trigger: str | re.Pattern[str]) -> bool:
2532
if isinstance(trigger, re.Pattern):
@@ -128,6 +135,8 @@ def main() -> int:
128135
print(f"Error querying coverage database: {e}", file=sys.stderr)
129136
return 1
130137

138+
affected_test_files -= EXCLUDED_TEST_FILES
139+
131140
# Also include any test files that were directly changed/added in the PR
132141
changed_test_files = get_changed_test_files(changed_files)
133142
if changed_test_files:

0 commit comments

Comments
 (0)