feat: update

This commit is contained in:
2026-10-14 12:14:31 +08:00
parent 19aac17a0a
commit d7ebb6ee85
15 changed files with 728 additions and 72 deletions
+23
View File
@@ -213,6 +213,29 @@ class BuilderCheckTests(unittest.TestCase):
self.assertIn("[FAIL] 10. 轨道工具链", text)
self.assertIn("docker: MISSING", text)
def test_ready_uses_curl_for_gitea_actions(self) -> None:
with tempfile.TemporaryDirectory() as temp:
project = Path(temp)
init_repo(project)
write_contract_makefile(project)
(project / "Dockerfile").write_text("FROM scratch\n", encoding="utf-8")
git(project, "remote", "add", "origin", "https://gitea.example.test/acme/widget.git")
code, text = run_check(
project,
"--ready",
env={"BUILD_VENUE": "ci"},
which={
"docker": "/usr/bin/docker",
"curl": "/usr/bin/curl",
"gh": None,
"glab": None,
},
)
self.assertEqual(code, 0, text)
self.assertIn("curl: found", text)
self.assertIn("Gitea API: /api/v1", text)
self.assertNotIn("glab: ", text)
def test_user_makefile_does_not_satisfy_contract(self) -> None:
with tempfile.TemporaryDirectory() as temp:
project = Path(temp)