Implement independent format gates for release workflow (issue #86)
Add XBPS build and sign steps to CI workflow Add XBPS publication as independent gate (requires manual trigger) Track format availability in release notes Update release-footer.md with XBPS install instructions Add --available/--withheld arguments to extract_changelog.py Attach XBPS artifacts to Gitea release Clean up XBPS signing key material after use
This commit is contained in:
@@ -209,3 +209,86 @@ def test_release_request_command_reports_create_or_patch_decisions(tmp_path):
|
||||
"path": "/releases/17",
|
||||
"payload": {"body": "## [1.4.0] - 2026-09-10\n"},
|
||||
}
|
||||
|
||||
|
||||
def test_format_availability_section_with_both():
|
||||
extractor = _extractor_module()
|
||||
result = extractor.format_availability_section(
|
||||
available=["Debian/Ubuntu (deb)", "Fedora/openSUSE (rpm)"],
|
||||
withheld=["Void Linux (xbps) — pending host acceptance"],
|
||||
)
|
||||
assert "Available: Debian/Ubuntu (deb), Fedora/openSUSE (rpm)" in result
|
||||
assert "Withheld: Void Linux (xbps) — pending host acceptance" in result
|
||||
assert "## Package formats" in result
|
||||
|
||||
|
||||
def test_format_availability_section_available_only():
|
||||
extractor = _extractor_module()
|
||||
result = extractor.format_availability_section(
|
||||
available=["Debian/Ubuntu (deb)", "Fedora/openSUSE (rpm)", "Void Linux (xbps)"],
|
||||
withheld=[],
|
||||
)
|
||||
assert "Available: Debian/Ubuntu (deb), Fedora/openSUSE (rpm), Void Linux (xbps)" in result
|
||||
assert "Withheld" not in result
|
||||
|
||||
|
||||
def test_format_availability_section_empty():
|
||||
extractor = _extractor_module()
|
||||
result = extractor.format_availability_section(available=[], withheld=[])
|
||||
assert result == ""
|
||||
|
||||
|
||||
def test_command_includes_format_availability(tmp_path):
|
||||
changelog = tmp_path / "CHANGELOG.md"
|
||||
changelog.write_text(
|
||||
"# Changelog\n\n## [Unreleased]\n\n## [1.4.0] - 2026-09-10\n\n"
|
||||
"### Added\n\n- Show a release summary.\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
result = subprocess.run(
|
||||
[
|
||||
sys.executable,
|
||||
str(EXTRACTOR_PATH),
|
||||
str(changelog),
|
||||
"1.4.0",
|
||||
"--available",
|
||||
"Debian/Ubuntu (deb)",
|
||||
"--available",
|
||||
"Fedora/openSUSE (rpm)",
|
||||
"--withheld",
|
||||
"Void Linux (xbps)",
|
||||
],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
|
||||
assert result.returncode == 0
|
||||
assert "## Package formats" in result.stdout
|
||||
assert "Available: Debian/Ubuntu (deb), Fedora/openSUSE (rpm)" in result.stdout
|
||||
assert "Withheld: Void Linux (xbps)" in result.stdout
|
||||
|
||||
|
||||
def test_command_without_format_args_has_no_formats_section(tmp_path):
|
||||
changelog = tmp_path / "CHANGELOG.md"
|
||||
changelog.write_text(
|
||||
"# Changelog\n\n## [Unreleased]\n\n## [1.4.0] - 2026-09-10\n\n"
|
||||
"### Added\n\n- Show a release summary.\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
result = subprocess.run(
|
||||
[
|
||||
sys.executable,
|
||||
str(EXTRACTOR_PATH),
|
||||
str(changelog),
|
||||
"1.4.0",
|
||||
],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
|
||||
assert result.returncode == 0
|
||||
assert "## Package formats" not in result.stdout
|
||||
|
||||
Reference in New Issue
Block a user