diff --git a/.github/workflows/downstream_compatibility.yml b/.github/workflows/downstream_compatibility.yml index 47643c1e8..83e6ec2bd 100644 --- a/.github/workflows/downstream_compatibility.yml +++ b/.github/workflows/downstream_compatibility.yml @@ -53,6 +53,8 @@ jobs: "persistency and remote", "process_description and local", "process_description and remote", + "reference_integration and local", + "reference_integration and remote", "score and local", "score and remote", "time and remote", diff --git a/src/tests/downstream_compatibility/README.md b/src/tests/downstream_compatibility/README.md index eaa12039a..e6df934ac 100644 --- a/src/tests/downstream_compatibility/README.md +++ b/src/tests/downstream_compatibility/README.md @@ -96,6 +96,7 @@ Filters which repositories to test. - [module_template](https://github.com/eclipse-score/module_template) - [persistency](https://github.com/eclipse-score/persistency) - [process_description](https://github.com/eclipse-score/process_description) +- [reference_integration](https://github.com/eclipse-score/reference_integration) - [score](https://github.com/eclipse-score/score) - [time](https://github.com/eclipse-score/time) diff --git a/src/tests/downstream_compatibility/test_downstream_compatibility.py b/src/tests/downstream_compatibility/test_downstream_compatibility.py index cfd60d010..f6bf54bd2 100644 --- a/src/tests/downstream_compatibility/test_downstream_compatibility.py +++ b/src/tests/downstream_compatibility/test_downstream_compatibility.py @@ -51,9 +51,14 @@ class ConsumerRepo: name: str git_url: str commands: list[str] + module_file: str def __init__( - self, name: str, git_url: str | None = None, commands: list[str] | None = None + self, + name: str, + git_url: str | None = None, + commands: list[str] | None = None, + module_file: str = "MODULE.bazel", ) -> None: self.name = name @@ -68,6 +73,7 @@ def __init__( # The minimum is to ensure that the repo can build against the current score_docs_as_code branch. # If docs works, then usually docs_check and needs_json will work as well. self.commands = ["bazel run //:docs"] + self.module_file = module_file REPOS_TO_TEST: list[ConsumerRepo] = [ @@ -99,6 +105,10 @@ def __init__( "bazel build //:needs_json", ], ), + ConsumerRepo( + name="reference_integration", + module_file="bazel_common/score_modules_tooling.MODULE.bazel", + ), ConsumerRepo( name="score", commands=[ @@ -157,10 +167,15 @@ def _strip_score_docs_overrides(content: str) -> str: def _write_module_bazel( - repo_path: Path, override_type: str, commit: str, remote: str + repo_path: Path, + override_type: str, + commit: str, + remote: str, + module_file: str = "MODULE.bazel", ) -> None: - """Overwrite MODULE.bazel with the requested override type applied.""" - original = (repo_path / "MODULE.bazel").read_text(encoding="utf-8") + """Overwrite the selected module file with the requested override applied.""" + module_path = repo_path / module_file + original = module_path.read_text(encoding="utf-8") base = _strip_score_docs_overrides(original) if override_type == "local": @@ -177,7 +192,7 @@ def _write_module_bazel( commit = "{commit}" )""" - (repo_path / "MODULE.bazel").write_text( + module_path.write_text( re.sub(_BAZEL_DEP_PATTERN, replacement, base, flags=re.MULTILINE), encoding="utf-8", ) @@ -402,6 +417,12 @@ def test_consumer_repo( repo_path = repos_base_dir / repo.name _ensure_repo(repo_path, repo.git_url, use_cache) - _write_module_bazel(repo_path, override_type, current_hash, gh_url) + _write_module_bazel( + repo_path, + override_type, + current_hash, + gh_url, + module_file=repo.module_file, + ) _cleanup_before_cmd(repo_path, cmd) _run_bazel_cmd(cmd, repo.name, repo_path)