-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
ci: skip Release and its helper for test-only pull requests #13122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3460796
edb9c9d
a14fa0d
9d6835f
9c305e8
7b167e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,16 +18,18 @@ class ChangeAreas: | |
| macos: bool | ||
| web: bool | ||
| agent_session_web: bool | ||
| release_build: bool | ||
|
|
||
| @classmethod | ||
| def all(cls) -> ChangeAreas: | ||
| return cls(macos=True, web=True, agent_session_web=True) | ||
| return cls(macos=True, web=True, agent_session_web=True, release_build=True) | ||
|
|
||
| def as_output_lines(self) -> list[str]: | ||
| return [ | ||
| f"macos={bool_output(self.macos)}", | ||
| f"web={bool_output(self.web)}", | ||
| f"agent_session_web={bool_output(self.agent_session_web)}", | ||
| f"release_build={bool_output(self.release_build)}", | ||
| ] | ||
|
|
||
|
|
||
|
|
@@ -255,10 +257,20 @@ def is_macos_change(path: str) -> bool: | |
| return not is_macos_neutral(path) | ||
|
|
||
|
|
||
| _PACKAGE_TESTS_RE = re.compile(r"Packages/[^/]+/[^/]+/Tests/") | ||
|
|
||
|
|
||
| def is_test_only_source(path: str) -> bool: | ||
| # The Release app builds only the cmux target, so test sources cannot reach | ||
| # it. A new test file also edits project.pbxproj, which is not matched here. | ||
| return path.startswith(("cmuxTests/", "cmuxUITests/")) or bool(_PACKAGE_TESTS_RE.match(path)) | ||
|
Comment on lines
+263
to
+266
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When a Release-relevant file is renamed into one of these test directories, |
||
|
|
||
|
|
||
| def classify_files(paths: Iterable[str], *, ci_workflow_linux_only: bool = False) -> ChangeAreas: | ||
| macos = False | ||
| web = False | ||
| agent_session_web = False | ||
| release_build = False | ||
| test_references = load_macos_job_test_references() | ||
|
|
||
| for raw_path in paths: | ||
|
|
@@ -271,6 +283,7 @@ def classify_files(paths: Iterable[str], *, ci_workflow_linux_only: bool = False | |
| macos = True | ||
| web = True | ||
| agent_session_web = True | ||
| release_build = True | ||
| continue | ||
| if is_other_workflow_config(path) or is_guard_only_test(path, test_references): | ||
| continue | ||
|
|
@@ -280,11 +293,14 @@ def classify_files(paths: Iterable[str], *, ci_workflow_linux_only: bool = False | |
| agent_session_web = True | ||
| if is_macos_change(path): | ||
| macos = True | ||
| if not is_test_only_source(path): | ||
| release_build = True | ||
|
|
||
| return ChangeAreas( | ||
| macos=macos, | ||
| web=web, | ||
| agent_session_web=agent_session_web, | ||
| release_build=release_build, | ||
| ) | ||
|
|
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.