CI: check the launcher's workspace on every push to main and on pull requests that touch it

verify's cargo runs never build launcher/ (its own workspace), so #2059 and the
registry ratings commit each passed alone and left main's launcher failing to
compile (E0061). The new launcher job runs its rustfmt, clippy -D warnings and lib
tests when a pull request changes the launcher, a crate it builds or the root
manifests, and on every push to main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-26 16:29:09 +01:00
parent d880b23fec
commit dbbe3a45d9
3 changed files with 73 additions and 3 deletions
+12 -1
View File
@@ -4,7 +4,7 @@ import subprocess
import tempfile
import unittest
from tools.ci.rust_changes import changed_paths, needs_rust
from tools.ci.rust_changes import changed_paths, needs_launcher, needs_rust
class RustChangesTests(unittest.TestCase):
@@ -21,6 +21,17 @@ class RustChangesTests(unittest.TestCase):
with self.subTest(path=path):
self.assertTrue(needs_rust(["README.md", path]))
def test_launcher_checks_follow_the_crates_it_builds(self):
for path in ["crates/horizon-client/src/game.rs", "launcher/links.json", "launcher/docs/a.md",
"launcher/README.md", "website/src/index.html", "tools/pr_ready.py"]:
with self.subTest(path=path):
self.assertFalse(needs_launcher([path]))
for path in ["launcher/src/main.rs", "launcher/Cargo.lock", "crates/horizon-port-pack/src/net.rs",
"crates/horizon-theme/src/lib.rs", "Cargo.toml", "Cargo.lock",
".github/workflows/ci.yml"]:
with self.subTest(path=path):
self.assertTrue(needs_launcher(["README.md", path]))
def test_moving_source_into_docs_still_requires_rust(self):
with tempfile.TemporaryDirectory() as directory:
def git(*args):