v30.3-roots.1 · Commit 62: [PATCH 62/68] fix(release): create drafts from reviewed immutable assets
ci/test/test_release_version.py
Before: ci/test/test_release_version.py · After: ci/test/test_release_version.py
File metadata
index 9da3c7bbc9ad63136d554d46b72b6716ad6eb97c..1e193d4f940733835997c0dbe9a24cb2c8bd2292 100755
Download original patch · Release notes
Diff rows 1–55 of 55. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
ci/test/test_release_version.py
CHANGED
|
@@ -108,22 +108,22 @@ class ReleaseVersionTest(unittest.TestCase):
|
|
|
108
108
|
self.assertEqual(result.returncode, status, result.stderr)
|
|
109
109
|
self.assertEqual(log.read_text().strip(), f"--verify {build}/deploy/Bitcoin-Qt.app")
|
|
110
110
|
|
|
111
|
-
def test_workflow_builds_tags_and_rehearses_explicit_canonical_commits(self):
|
|
111
|
+
def test_workflow_only_rehearses_explicit_canonical_commits(self):
|
|
112
112
|
workflow = RELEASE_WORKFLOW.read_text(encoding="utf-8")
|
|
113
|
-
self.assertIn("tags:", workflow)
|
|
114
|
-
self.assertIn("'v[0-9]*-roots.[0-9]*'", workflow)
|
|
115
113
|
self.assertIn("workflow_dispatch:", workflow)
|
|
116
|
-
self.assertNotIn("branches:", workflow)
|
|
117
|
-
self.assertIn("github.event_name == 'push' && github.ref_name || inputs.release_tag", workflow)
|
|
118
|
-
self.assertIn("release_commit:", workflow)
|
|
119
|
-
self.assertIn("inputs.release_commit", workflow)
|
|
114
|
+
self.assertNotIn(" push:", workflow)
|
|
115
|
+
self.assertNotIn("publish-release:", workflow)
|
|
116
|
+
self.assertNotIn("contents: write", workflow)
|
|
117
|
+
self.assertNotIn("gh release", workflow)
|
|
118
|
+
self.assertIn("RELEASE_TAG: ${{ inputs.release_tag }}", workflow)
|
|
119
|
+
self.assertIn("RELEASE_COMMIT: ${{ inputs.release_commit }}", workflow)
|
|
120
120
|
self.assertIn("ref: ${{ env.RELEASE_SOURCE_REF }}", workflow)
|
|
121
|
-
self.assertIn("if: github.event_name == 'push'", workflow)
|
|
122
|
-
self.assertIn("ci/release/prepare-release-source.sh", workflow)
|
|
123
|
-
self.assertEqual(workflow.count("ci/release/prepare-release-source.sh"), 5)
|
|
124
|
-
self.assertEqual(workflow.count("contents: write"), 1)
|
|
121
|
+
self.assertEqual(workflow.count("ci/release/prepare-release-source.sh"), 4)
|
|
125
122
|
self.assertNotIn("origin main:refs/remotes/origin/main", workflow)
|
|
126
|
-
self.assertIn("environment: release", workflow)
|
|
123
|
+
for metadata_workflow in (RELEASE_WORKFLOW, ROOT / ".github/workflows/ci.yml"):
|
|
124
|
+
metadata = metadata_workflow.read_text()
|
|
125
|
+
self.assertIn("python3 ci/test/test_release_notices.py", metadata)
|
|
126
|
+
self.assertIn("python3 ci/test/test_create_release_draft.py", metadata)
|
|
127
127
|
|
|
128
128
|
def test_workflow_builds_complete_artifact_matrix_and_patch(self):
|
|
129
129
|
workflow = RELEASE_WORKFLOW.read_text(encoding="utf-8")
|
|
@@ -135,13 +135,8 @@ class ReleaseVersionTest(unittest.TestCase):
|
|
|
135
135
|
"bitcoin-roots-windows-x86_64",
|
|
136
136
|
]:
|
|
137
137
|
self.assertIn(artifact, workflow)
|
|
138
|
-
self.assertIn("EXPECTED_PACKAGE_COUNT: 5", workflow)
|
|
139
138
|
self.assertIn("ci/release/create-patch-series.sh", workflow)
|
|
140
|
-
self.assertIn("ci/release/prepare-release.sh", workflow)
|
|
141
|
-
self.assertIn("ci/release/sign-manifest.sh", workflow)
|
|
142
|
-
self.assertIn("SHA512SUMS", workflow)
|
|
143
|
-
self.assertIn("gh release upload", workflow)
|
|
144
|
-
self.assertIn("gh release create", workflow)
|
|
139
|
+
self.assertIn("ci/release/create-draft.py", workflow)
|
|
145
140
|
|
|
146
141
|
def test_workflow_references_only_present_local_release_files(self):
|
|
147
142
|
workflow = RELEASE_WORKFLOW.read_text(encoding="utf-8")
|
|
@@ -157,7 +152,6 @@ class ReleaseVersionTest(unittest.TestCase):
|
|
|
157
152
|
actions,
|
|
158
153
|
{
|
|
159
154
|
"actions/checkout@v6",
|
|
160
|
-
"actions/download-artifact@v5",
|
|
161
155
|
"actions/upload-artifact@v4",
|
|
162
156
|
"./.github/actions/configure-docker",
|
|
163
157
|
"./.github/actions/configure-environment",
|