fix(ci): publish offline lite verification #5

Merged
ageorge156 merged 4 commits from codex/module-spec-pilot-20260820 into main 2026-08-20 20:25:01 +08:00
Showing only changes of commit 80a5199150 - Show all commits
+41
View File
@@ -0,0 +1,41 @@
from __future__ import annotations
import re
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
class CiContractTests(unittest.TestCase):
def test_ci_publishes_one_offline_lite_gate(self) -> None:
workflow = (ROOT / ".gitea/workflows/ci.yml").read_text(encoding="utf-8")
job_block = workflow.split("jobs:", 1)[1]
self.assertEqual(
re.findall(r"(?m)^ ([a-z][a-z0-9_-]*):\s*$", job_block),
["lite"],
)
self.assertIn(
"actions/checkout@524e936cd9e579adf00e308bfdf971aebc7de09e",
workflow,
)
self.assertIn("persist-credentials: false", workflow)
self.assertIn(
"python3 -m unittest discover -s tests -v",
workflow,
)
for forbidden in (
"actions/checkout@v",
"apt ",
"pip ",
"curl ",
"wget ",
"docker pull",
):
self.assertNotIn(forbidden, workflow)
if __name__ == "__main__":
unittest.main()