Skip to content

Commit 0770c78

Browse files
[3.13] gh-141004: Don't trigger run-tests when Tools/check-c-api-docs/ignored_c_api.txt is changed (GH-143583) (GH-143794)
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 <89152624+StanFromIreland@users.noreply.github.com>
1 parent cbf08d5 commit 0770c78

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"),
@@ -167,11 +169,7 @@ def process_changed_files(changed_files: Set[Path]) -> Outputs:
167169
if file.name == "reusable-wasi.yml":
168170
platforms_changed.add("wasi")
169171

170-
if not (
171-
doc_file
172-
or file == GITHUB_CODEOWNERS_PATH
173-
or file.name in CONFIGURATION_FILE_NAMES
174-
):
172+
if not doc_file and file not in RUN_TESTS_IGNORE:
175173
run_tests = True
176174

177175
platform = get_file_platform(file)

0 commit comments

Comments
 (0)