mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-07 01:46:53 +01:00
Run generation tests through validator
Keep the existing workflow unchanged while making schema validation self-contained when jsonschema is unavailable. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bd6344b4-eafd-4a58-a1c9-5a2d96fa2938
This commit is contained in:
parent
b0d71418fa
commit
fbf5d7ec93
4 changed files with 167 additions and 9 deletions
8
.github/scripts/validate_frontmatter.py
vendored
8
.github/scripts/validate_frontmatter.py
vendored
|
|
@ -16,6 +16,7 @@ from __future__ import annotations
|
|||
import argparse
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
|
|
@ -692,7 +693,12 @@ def main(argv: list[str] | None = None) -> int:
|
|||
n_err = len(report.errors)
|
||||
n_warn = len(report.warnings)
|
||||
print(f"\nValidator: {n_err} error(s), {n_warn} warning(s)")
|
||||
return 1 if n_err else 0
|
||||
if n_err:
|
||||
return 1
|
||||
|
||||
contract_tests = root / ".github" / "scripts" / "test_generation_contracts.py"
|
||||
result = subprocess.run([sys.executable, str(contract_tests)], cwd=root, check=False)
|
||||
return result.returncode
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue