Update index.md #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous Integration | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| name: "🧪 Build & Run Safety Suite" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "🦀 Set up Rust" | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| components: clippy, rustfmt | |
| - name: "📦 Set up uv" | |
| uses: astral-sh/setup-uv@v2 | |
| - name: "🧱 Install dependencies (dev + training extras)" | |
| run: | | |
| uv sync --extra dev --extra training | |
| - name: "⚙️ Build Rust extension (develop mode in uv env)" | |
| run: | | |
| uv run maturin develop --release | |
| - name: "🧹 Lint and format check" | |
| continue-on-error: true | |
| run: | | |
| cargo fmt -- --check | |
| cargo clippy -- -D warnings | |
| uv run black --check python/ | |
| uv run ruff check python/ | |
| uv run mypy python/ | |
| - name: "🧪 Run Safety Test Suite" | |
| env: | |
| PYTHONPATH: ./python | |
| run: | | |
| echo "Running pytest safety checks..." | |
| uv run pytest -v python/tests/test_safety.py | |
| - name: "🧹 Cleanup build artifacts" | |
| if: always() | |
| run: | | |
| # Rust artifacts | |
| cargo clean || true | |
| rm -rf target/ target/wheels/ || true | |
| # Python native extensions (if any were built) | |
| find python/pe_packer -maxdepth 1 -name "_native*.so" -delete || true | |
| # Caches | |
| rm -rf .mypy_cache .pytest_cache || true | |
| # Dataset outputs (adjust path if used in tests) | |
| rm -rf training_data/ || true | |
| - name: "✅ Summary" | |
| if: success() | |
| run: echo "✅ All safety and CI checks passed." | |
| - name: "❌ Failure notice" | |
| if: failure() | |
| run: echo "❌ Safety suite failed. Blocking release." | |
| test: | |
| runs-on: ubuntu-latest | |
| name: "🧪 Python Tests (uv)" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v2 | |
| - name: Install dependencies | |
| run: uv sync --extra dev --extra training | |
| - name: Run tests | |
| run: uv run pytest -q python |