Skip to content

Testing & CI

Safety Tests

The safety suite verifies the gating behavior to prevent accidental packing.

  • File: python/tests/test_safety.py
  • Verifies:
  • Dry-run when env is missing.
  • Dry-run when --force is missing.
  • Proceed past dry-run only when both env+flag are present.

Run locally:

uv run pytest -q python/tests/test_safety.py

Continuous Integration

  • Workflow: /.github/workflows/ci.yml
  • Builds Rust extension with maturin develop.
  • Runs format/lint/mypy.
  • Executes safety tests.
  • Docs deploy: /.github/workflows/docs.yml builds MkDocs and deploys to GitHub Pages.

Dataset Generation Smoke Test (optional)

You can optionally add a light dataset smoke test in CI if you maintain benign PE files in a private test fixture. Keep it disabled by default.

# Example (disabled by default)
- name: Dataset smoke test (optional)
  if: false
  run: |
    pe-packer generate-training-data ./benign_samples ./training_data --variants 1
    pe-packer analyze-dataset ./training_data/dataset_metadata.json