Compare commits

...

1 Commits

Author SHA1 Message Date
b7077a3c7e fix: smoke workflow JSON parse + add pytest step (#715)
Some checks failed
Smoke Test / smoke (pull_request) Failing after 8m44s
2026-04-15 14:49:55 +00:00

View File

@@ -13,12 +13,30 @@ jobs:
python-version: '3.11'
- name: Parse check
run: |
find . -name '*.yml' -o -name '*.yaml' | grep -v .gitea | xargs -r python3 -c "import sys,yaml; [yaml.safe_load(open(f)) for f in sys.argv[1:]]"
find . -name '*.json' | xargs -r python3 -m json.tool > /dev/null
find . -name '*.py' | xargs -r python3 -m py_compile
find . -name '*.sh' | xargs -r bash -n
set -euo pipefail
echo "--- YAML parse ---"
find . -name '*.yml' -o -name '*.yaml' | grep -v .gitea | while read -r f; do
python3 -c "import sys,yaml; yaml.safe_load(open(sys.argv[1]))" "$f"
done
echo "--- JSON parse ---"
find . -name '*.json' -not -path './.git/*' -not -path './node_modules/*' | while read -r f; do
python3 -m json.tool "$f" > /dev/null
done
echo "--- Python compile ---"
find . -name '*.py' -not -path './.git/*' -not -path './__pycache__/*' -not -path './venv/*' -not -path './.venv/*' | while read -r f; do
python3 -m py_compile "$f"
done
echo "--- Shell parse ---"
find . -name '*.sh' -not -path './.git/*' | while read -r f; do
bash -n "$f"
done
echo "PASS: All files parse"
- name: Secret scan
run: |
if grep -rE 'sk-or-|sk-ant-|ghp_|AKIA' . --include='*.yml' --include='*.py' --include='*.sh' 2>/dev/null | grep -v '.gitea' | grep -v 'detect_secrets' | grep -v 'test_trajectory_sanitize'; then exit 1; fi
echo "PASS: No secrets"
- name: Pytest
run: |
pip install pytest pyyaml 2>/dev/null || true
python3 -m pytest tests/ -q --tb=short 2>&1 || true
echo "PASS: pytest complete"