name: Python CI on: pull_request: push: branches: - main workflow_dispatch: jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install lint tooling run: python -m pip install ruff==0.11.13 - name: Run Ruff run: >- ruff check --select F,E9 app.py api_payload_utils.py space_bootstrap.py space_runtime.py scripts syntax-smoke: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install syntax tooling run: python -m pip install PyYAML==6.0.2 - name: Workflow hygiene static checks run: ./scripts/workflow_hygiene.sh - name: Compile core runtime files run: >- python -m py_compile app.py api_payload_utils.py app_local.py app_proxy.py space_bootstrap.py space_runtime.py adapter_policy_runtime.py scripts/check_workflow_yaml.py scripts/resolve_hf_space_config.py scripts/ensure_hf_space.py scripts/space_smoke.py scripts/check_repo_parity.py scripts/validate_gate_json.py scripts/validate_generation_manifest.py scripts/validate_adapter_policy.py scripts/validate_generation_run_json.py scripts/check_adapter_policy.py generation_run_manifest.py - name: Validate agent gate example JSON run: python scripts/validate_gate_json.py docs/gate-results/example.json - name: Validate generation manifest example JSON run: python scripts/validate_generation_manifest.py docs/generation-manifests/example.json - name: Validate adapter policy example JSON run: python scripts/validate_adapter_policy.py docs/adapters/policy.example.json - name: Adapter policy check smoke run: python scripts/check_adapter_policy.py - name: Validate generation run example JSON run: python scripts/validate_generation_run_json.py docs/generation-runs/example.json space-live-smoke: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: "3.12" - name: Live Space health and HTML smoke run: python scripts/space_smoke.py --health-only --html-check space-generate-smoke: if: github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install smoke dependencies run: python -m pip install -r scripts/smoke-requirements.txt - name: Live Space generate smoke (ZeroGPU quota) run: python scripts/space_smoke.py --generate --write-manifest generation-smoke-manifest.json - name: Upload generation smoke manifest if: always() uses: actions/upload-artifact@v4 with: name: generation-smoke-manifest path: generation-smoke-manifest.json if-no-files-found: ignore repo-parity: if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest continue-on-error: true steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: "3.12" - name: Warn when GitHub main diverges from Hugging Face Space run: | set -euo pipefail git remote add hf-space https://huggingface.co/spaces/th3w1zard1/Pixal3D python scripts/check_repo_parity.py --github-remote origin --hf-remote hf-space