chore: setup openapi contract gate [AC-INIT] #7

Merged
MerCry merged 3 commits from setup-gate into main 2026-02-23 15:38:04 +00:00
1 changed files with 14 additions and 1 deletions
Showing only changes of commit c035d4b7b4 - Show all commits

View File

@ -59,7 +59,20 @@ jobs:
set -eu
if command -v python3 >/dev/null 2>&1; then
python3 -c "import sys; print('python3:', sys.version.split()[0])"
# Try to install pyyaml if missing
if ! python3 -c "import yaml" 2>/dev/null; then
echo "PyYAML missing, attempting to install..."
python3 -m pip install pyyaml --user >/dev/null 2>&1 || true
fi
# Check again and run if available
if python3 -c "import yaml" 2>/dev/null; then
find spec -name "*.yaml" -o -name "*.yml" | xargs -I {} python3 -c "import yaml; yaml.safe_load(open('{}'))"
echo "YAML check passed."
else
echo "PyYAML still missing; skipping YAML parse check."
fi
else
echo "python3 not available; skip YAML parse check"
fi