SilverSight/.github/workflows/python-check.yml

40 lines
1.6 KiB
YAML

name: Python Check
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install deps
run: |
pip install -r requirements.txt
pip install sympy numpy
- name: Syntax check
run: |
# Check standalone scripts that don't need quimb/networkx
python3 -m py_compile scripts/check_determinism.py
python3 -m py_compile scripts/cross_domain_significance.py
python3 -m py_compile scripts/verify_with_sympy.py
python3 -m py_compile scripts/verify_receipt.py
python3 -m py_compile scripts/validate_known_equations.py
python3 -m py_compile python/generate_predictions.py
python3 -m py_compile python/build_manifold.py
python3 -m py_compile python/build_pist_matrices_250.py
echo "✅ Syntax check passed"
- name: Run standalone tests
run: |
python3 scripts/check_determinism.py
python3 scripts/verify_with_sympy.py
python3 scripts/validate_known_equations.py
echo "✅ Standalone tests passed"
- name: Check for secrets
run: |
if grep -rn "api_key\|password\|token\|secret" --include="*.py" python/ qubo/ scripts/ tests/ | grep -v "test_" | grep -v "expected\|example\|placeholder\|CHANGE"; then
echo "ERROR: Possible hardcoded secrets found"
exit 1
fi
echo "✅ Secret scan passed"