Skip to content

Commit a705f57

Browse files
[3.14] gh-141004: Don't trigger run-tests when Tools/check-c-api-docs/ignored_c_api.txt is changed (GH-143583) (GH-143793)
gh-141004: Don't trigger `run-tests` when `Tools/check-c-api-docs/ignored_c_api.txt` is changed (GH-143583) (cherry picked from commit 1176fac) Co-authored-by: Stan Ulbrych <[email protected]>
1 parent 3c8c4e9 commit a705f57

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Tools/build/compute-changes.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@
1919
from collections.abc import Set
2020

2121
GITHUB_DEFAULT_BRANCH = os.environ["GITHUB_DEFAULT_BRANCH"]
22-
GITHUB_CODEOWNERS_PATH = Path(".github/CODEOWNERS")
2322
GITHUB_WORKFLOWS_PATH = Path(".github/workflows")
2423

25-
CONFIGURATION_FILE_NAMES = frozenset({
26-
".pre-commit-config.yaml",
27-
".ruff.toml",
28-
"mypy.ini",
24+
RUN_TESTS_IGNORE = frozenset({
25+
Path("Tools/check-c-api-docs/ignored_c_api.txt"),
26+
Path(".github/CODEOWNERS"),
27+
Path(".pre-commit-config.yaml"),
28+
Path(".ruff.toml"),
29+
Path("mypy.ini"),
2930
})
31+
3032
UNIX_BUILD_SYSTEM_FILE_NAMES = frozenset({
3133
Path("aclocal.m4"),
3234
Path("config.guess"),
@@ -172,11 +174,7 @@ def process_changed_files(changed_files: Set[Path]) -> Outputs:
172174
if file.name == "reusable-wasi.yml":
173175
platforms_changed.add("wasi")
174176

175-
if not (
176-
doc_file
177-
or file == GITHUB_CODEOWNERS_PATH
178-
or file.name in CONFIGURATION_FILE_NAMES
179-
):
177+
if not doc_file and file not in RUN_TESTS_IGNORE:
180178
run_tests = True
181179

182180
platform = get_file_platform(file)

0 commit comments

Comments
 (0)