fix(ci): skip non-ci reproducible wbs tasks
This commit is contained in:
+16
-3
@@ -146,9 +146,22 @@ jobs:
|
|||||||
# 가능한 것만 나열한다. 실제 KIS API/라이브 앱이 전제인 나머지 DONE 작업은
|
# 가능한 것만 나열한다. 실제 KIS API/라이브 앱이 전제인 나머지 DONE 작업은
|
||||||
# spec/60의 execution.mode: not_ci_reproducible 로 별도 표시되어
|
# spec/60의 execution.mode: not_ci_reproducible 로 별도 표시되어
|
||||||
# validate_quant_engine_wbs_v1.py 가 verdict 부재를 FAIL로 취급하지 않는다.
|
# validate_quant_engine_wbs_v1.py 가 verdict 부재를 FAIL로 취급하지 않는다.
|
||||||
for task in QE-M0-01 QE-M0-02 QE-M0-03 QE-M0-04 QE-M0-05 QE-M0-06 QE-M0-07 QE-M1-05 QE-M1-06 QE-M2-01 QE-M2-03 QE-M2-06 QE-M3-01 QE-M3-02 QE-M3-03 QE-M3-04 QE-M3-05; do
|
python3 - <<'PY'
|
||||||
python3 tools/verify_wbs_task_v1.py --task "$task"
|
from pathlib import Path
|
||||||
done
|
import subprocess
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
root = Path.cwd()
|
||||||
|
spec = yaml.safe_load((root / "spec" / "60_quant_engine_wbs.yaml").read_text(encoding="utf-8"))
|
||||||
|
tasks = spec.get("tasks") or {}
|
||||||
|
for task_id, task in tasks.items():
|
||||||
|
if task.get("status") != "DONE":
|
||||||
|
continue
|
||||||
|
mode = ((task.get("execution") or {}).get("mode"))
|
||||||
|
if mode in {"not_ci_reproducible", "manual_user_action"}:
|
||||||
|
continue
|
||||||
|
subprocess.run(["python3", "tools/verify_wbs_task_v1.py", "--task", task_id], check=True, cwd=root)
|
||||||
|
PY
|
||||||
|
|
||||||
- name: Validate Quant Engine WBS
|
- name: Validate Quant Engine WBS
|
||||||
run: python3 tools/validate_quant_engine_wbs_v1.py
|
run: python3 tools/validate_quant_engine_wbs_v1.py
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
import re
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
@@ -60,21 +59,12 @@ def main() -> int:
|
|||||||
done_tasks.append(task_id)
|
done_tasks.append(task_id)
|
||||||
done_tasks.sort()
|
done_tasks.sort()
|
||||||
|
|
||||||
match = re.search(
|
if 'root / "spec" / "60_quant_engine_wbs.yaml"' not in ci_text:
|
||||||
r"for task in (?P<tasks>.+?); do\s+python3 tools/verify_wbs_task_v1\.py --task \"?\$?task\"?\s+done",
|
errors.append("workflow does not derive DONE verdict tasks from spec/60_quant_engine_wbs.yaml")
|
||||||
ci_text,
|
if 'mode in {"not_ci_reproducible", "manual_user_action"}' not in ci_text:
|
||||||
re.S,
|
errors.append("workflow does not skip not_ci_reproducible/manual_user_action tasks")
|
||||||
)
|
if "python3 - <<'PY'" not in ci_text:
|
||||||
if not match:
|
errors.append("workflow still hardcodes DONE verdict task list")
|
||||||
errors.append("workflow missing Generate DONE WBS Verdicts task list")
|
|
||||||
else:
|
|
||||||
declared = re.findall(r"QE-[A-Z0-9-]+", match.group("tasks"))
|
|
||||||
missing = [task for task in done_tasks if task not in declared]
|
|
||||||
extra = [task for task in declared if task not in done_tasks]
|
|
||||||
if missing:
|
|
||||||
errors.append("workflow omits DONE verdict tasks: " + ", ".join(missing))
|
|
||||||
if extra:
|
|
||||||
errors.append("workflow includes non-DONE verdict tasks: " + ", ".join(extra))
|
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
"formula_id": "GITEA_CI_WORKFLOW_LINT_V1",
|
"formula_id": "GITEA_CI_WORKFLOW_LINT_V1",
|
||||||
|
|||||||
Reference in New Issue
Block a user