Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Verify action compatibility with generated templates
run: |
set -euo pipefail
make template-compat-e2e
TEMPLATE_COMPAT_EXTRA_ARGS=--current-template-only make template-compat-e2e

- name: Verify generated template publication readiness
run: |
Expand Down
9 changes: 8 additions & 1 deletion scripts/template_compat_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ def run_compatibility_checks(
action_repo: Path,
action_python: Path,
extra_template_refs: list[str] | None = None,
current_template_only: bool = False,
keep_temp: bool = False,
) -> None:
contract = template_contract.validate_local_contract(ROOT)
Expand Down Expand Up @@ -626,7 +627,7 @@ def run_compatibility_checks(
except Exception as exc:
failures.append(f"current template: {exc}")

protected_refs = list(contract.protected_template_refs)
protected_refs = [] if current_template_only else list(contract.protected_template_refs)
for extra_ref in extra_template_refs or []:
protected_refs.append(
template_contract.ProtectedTemplateRef(
Expand Down Expand Up @@ -693,13 +694,19 @@ def main() -> None:
)
parser.add_argument("--action-repo", type=Path, default=DEFAULT_ACTION_REPO)
parser.add_argument("--action-python", type=Path, default=DEFAULT_ACTION_PYTHON)
parser.add_argument(
"--current-template-only",
action="store_true",
help="Check only the current generated template before a template-floor reset.",
)
parser.add_argument("--keep-temp", action="store_true")
args = parser.parse_args()
run_compatibility_checks(
current_template_dir=args.current_template_dir,
action_repo=args.action_repo,
action_python=args.action_python,
extra_template_refs=args.template_refs,
current_template_only=args.current_template_only,
keep_temp=args.keep_temp,
)

Expand Down
1 change: 1 addition & 0 deletions tests/test_action_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ def test_release_workflow_does_not_dispatch_dashboard_dev() -> None:
assert "/users/${APP_SLUG}[bot]" in app_user_step["run"]
assert "python3 scripts/enforce_release_policy.py" in commands
assert "make template-compat-e2e" in commands
assert "TEMPLATE_COMPAT_EXTRA_ARGS=--current-template-only make template-compat-e2e" in commands
assert "make publish-template-dry-run" in commands
assert "make package-template-release" in commands
assert "scripts/accept_action_release.py" in workflow_text
Expand Down