diff --git a/framework/cli/simple_module_cli/app_project.py b/framework/cli/simple_module_cli/app_project.py index 0ce9fe22..434aa89b 100644 --- a/framework/cli/simple_module_cli/app_project.py +++ b/framework/cli/simple_module_cli/app_project.py @@ -15,6 +15,7 @@ import json as _json import secrets as _secrets +import shutil as _shutil from collections.abc import Sequence from importlib.metadata import PackageNotFoundError from importlib.metadata import version as _pkg_version @@ -181,6 +182,9 @@ def _scaffold_sample_module(target: Path) -> None: if sample_dest.exists(): return create_module(sample_dest, name=_SAMPLE_MODULE_NAME) + # GitHub only reads workflows from the repo root, so the template's + # .github/ is dead inside a workspace. + _shutil.rmtree(sample_dest / ".github") _pin_sample_module_deps(sample_dest) _seed_static_dist_placeholder(sample_dest / _SAMPLE_MODULE_NAME / "static" / "dist") diff --git a/framework/cli/tests/test_cli_new.py b/framework/cli/tests/test_cli_new.py index e067eeee..15615f37 100644 --- a/framework/cli/tests/test_cli_new.py +++ b/framework/cli/tests/test_cli_new.py @@ -236,6 +236,7 @@ def test_sm_new_default_lays_down_workspace_layout(tmp_path: Path) -> None: assert (target / "host" / relpath).is_file(), f"missing host file: {relpath}" for relpath in (".env.example", "README.md", ".gitignore", "Makefile"): assert not (target / "host" / relpath).exists() + assert not (target / "modules" / "hello" / ".github").exists() def test_sm_new_default_wires_workspace_in_pyproject(tmp_path: Path) -> None: