fix: create releases through Gitea API
This commit is contained in:
1 parent
0cb4c0c1cf
commit
6da9847750
2 files changed
+51
-22
No files matched your search
@@ -0,0 +1,24 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
WORKFLOW = Path(".gitea/workflows/release.yml")
|
||||
|
||||
|
||||
def test_release_workflow_uses_gitea_api_not_github_cli():
|
||||
text = WORKFLOW.read_text()
|
||||
assert "gh release" not in text
|
||||
assert "/api/v1/repos/${{ github.repository }}/tags" in text
|
||||
assert "/api/v1/repos/${{ github.repository }}/releases" in text
|
||||
|
||||
|
||||
def test_release_workflow_targets_merge_commit_and_marks_rc():
|
||||
text = WORKFLOW.read_text()
|
||||
assert 'TARGET="${{ github.sha }}"' in text
|
||||
assert '"prerelease":true' in text
|
||||
assert '"draft":false' in text
|
||||
|
||||
|
||||
def test_release_workflow_fails_on_api_error():
|
||||
text = WORKFLOW.read_text()
|
||||
assert "curl --fail-with-body" in text
|
||||
assert "|| true" not in text
|
||||
Reference in new issue
Block a user