chore: setup openapi contract gate [AC-INIT] #7
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue