stackchain-dashboard/tests/test_release_workflow.py
timmy 2cb92811c9
All checks were successful
CI / lint (pull_request) Successful in 33s
CI / build-release (pull_request) Successful in 4s
CI / release-candidate (pull_request) Has been skipped
ci: gate RCs on verifiable artifacts (#339)
2026-08-08 20:35:52 +00:00

29 lines
882 B
Python

from pathlib import Path
LEGACY_WORKFLOW = Path(".gitea/workflows/release.yml")
CI_WORKFLOW = Path(".gitea/workflows/ci.yml")
STALE_MANIFEST = Path("release/manifest.json")
def test_independent_release_workflow_is_removed():
assert not LEGACY_WORKFLOW.exists()
def test_stale_static_release_manifest_is_removed():
assert not STALE_MANIFEST.exists()
def test_ci_publishes_a_draft_before_exposing_assets():
text = CI_WORKFLOW.read_text()
release = text[text.index(" release-candidate:") :]
create_draft = release.index('"draft":true')
upload_asset = release.index("/assets?name=")
publish = release.index('"draft":false')
assert create_draft < upload_asset < publish
assert '"prerelease":true' in release
assert 'TARGET="${{ github.sha }}"' in release
assert "curl --fail-with-body" in release
assert "|| true" not in release